finished exercise of chapter 9