modified the example
Bugs fixed and tested
Merge pull request #9 from tolbier/master

Last version had errors