update and add documents