same refactoring