This is the only use of cursor in this block.