docid now is optional