refactoring
full test coverage