fix codebook again