test for ps3b
finished part b, problem 2