added the codebook