refactor cursor
refactor