code coverage and refactoring