swap nodes in pairs.