Fixed part a problem 2