refactoring out some mess