updating chapter 2 example