Finished exercise 3.2