minor mods to make chatper 2 build, still need to document the readme.md