Committing exercise 7 from chapter 5.