finished exercise 1 and optional exercises