worked on problem 5