Added some missing code in chapter 2
Merge pull request #26 from Kakadu/master

Added some missing code in chapter 2