corrections for chapter 5

compile error in example code
grammatical corrections