chapter 5: exercise 9 - from