partial revert refactoring