update Swap_Nodes_in_Pairs