add documentation, remove pointless example
some error handling
rewrite using watchers
unit tests
unit tests