Adds chapter 2 code