added functionality to cursor class