updated the documentation and example