hw chap 7 iteration 3