Finished exercise 3.5