finished exercise 2.1