swapping adjacent nodes of a LinkedList