chapter 1 code finish