update the mongodb