adjusting references to cursorIndex through first manual run of functions