First working version of cursors