codebook improvements