Exercise 13.09 from chapter 13