Starting chapter 6, finished exercise 1