continuing the refactor