started mass refactoring