new activeEdge function