get_cursor() function added