insert and fetch with last updated document