phase two of refactor