Update Swap Nodes in Pairs

advised version, merging the initial section and the following section