finished exercise 1 for chapter 04