finished exercise 1.12