continued refactoring