Added documentation and example.