updated Swap Nodes in Pairs