passes test case with hazards :)