adding sample for toggling cursor.