change to codebook