Update_document and code