update the documents