Finished exercise 3.3.a