Exercise 1.10 solution