improve the cursor legend demo