replace doc_set with doc_dict