Exercise 10.9 solved