better impl for get_cursor related