added inline documentation
added tests and code coverage