Add part a of problem 3