improved document.Update