adding the variable codebook