chapter 5 rewrite