Add some of chapter 10 codes