remove nodesToEdge