Improving cursor example