Committing Exercise 3 from chapter 6