Finished exercise 2 final version