change order of edges