Updating cursor code