finished exercise 1 for chap 11