yet another refactoring