exercise 10, problem 19 solved