integration wip: restoring document