Modify document