refactoring baby!