ps6, problem 3 done.