finished chapter 12 excercise