better documentation and test coverage