all tests pass, need to refactor