added function findSwappableEdges