Exercise 10.7 solved