change the whole document