working on problem 5