adding in the codebook