hw chap 7 iteration 2