refactoring, again