continuing refactor