added documentation, tests, and examples