cleaned up hazardDetect