Finished exercise 6.7