out of refactoring hell