chapter 3 with code