mods from Chap 7 exer