start of cursor stuff