Changed a = a + 1 to a++ in implementation section. It is best practice to use a++ rather than a = a + 1