added examples, improved documentation