modifications for having a response when we modify a document in database