begun additional refactoring