adding codebook: