Finished exercise 1.29