Finished exercise 4.3