final updated code with comments
Merge pull request #38 from sasullivan/master

final updated code with comments