small edits in chapter 5 and 6