Updating the document