Finished exercise 2.3