sync with the code

replaces #19
Merge pull request #38 from vicb/patch-5

sync with the code