mostly done refactoring