finished exercise6