solved problem 22