Committing exercise 4 from chapter 7.