Change selection logic slightly
swapElements() with nodeList