refactoring, mikes additions