documentation
working version with tests
improving example and adding demo script