added tests and examples