Code for chapter 2 rewrite is complete