refactoring, again.