updated documentation and example