added doc pipe as main function
fix tests
added example in examples
added readme