refactoring like a boss