code up to chapter 10