first codes update for chapter 1