after refactoring