renamed cursor attribute to cursorPos, which is more coherent for position