new function get_qid ()