Modify document.