swap elements in pair (linked list)