working on problem 22