change query for update doc