add some codes of chap3