Committing exercise 13 from chapter 6.