Finished exercise 1.24