Finished exercise 4.13