updated documentation and examples