Completed exercise 5 of chapter 5.