Reached exercise 12 of chapter 5