Finished exercise 1 chapter 8