all tests pass, now time to refactor