revert bad refactoring