continued refactor