working on problem 4