Finish exercise 2 from chapter 3.5