chapter 5 finished - before exercises