Commiting exercise 5 from chapter 4.