continues work on refactoring back to a working state