hw chap 7 iteration 4