adding hazard checking