chapter 7 fixes
some chapter 7 and 8 fixes