Committing exercise 8 from chapter 5.