added tests and doc comments