method for swapping cursors