codes legalizeEdge