half done refactoring