Update code into chap3.

Signed-off-by: JiYou <jiyou09@gmail.com>