Merge pull request #3 from AssemblyCoffee/chap11

Chap11
Merge pull request #4 from AssemblyCoffee/chap11

fix some bugs
Merge pull request #5 from AssemblyCoffee/chap11

massive patch
fix a bug and close issue #2