make the example code in the README runnable
Merge pull request #46 from thraxil/master

make the example code in the README runnable