finished exercise 2.5