update source code to chap2