worked on problem 9