Committing exercise 9 from chapter 5.