another refactoring