doc_add method