cursor tool refactored

cursor tool test added