Pset3, problem 2 done