hw2 problem 3 done