finished exercise 3.3