Adding the codebook