copy the whole document