Added dual edge checking functions