Updates the documents