refactored cursors