slight changes to codebook