add rest of problem 1 and parts a and b of problem 2