added tests and documentation