Committing exercise 8 from chapter 6.