fix typo and formatting errors for chapter 3