passing all tests before refactoring