Finished exercise 40