implemented cursor