tests pass (with modifications)