updating the cursor