implemented cursor functions