major refactoring continues