improved test coverage and documentation