section 9.6.6 - finished exercise