Finished exercise 2.52