refactoring by code coverage