finished exercise of chapter 1.2