Finished exercise 5.6