refactoring to suck less