more test coverage and documentation