Update the Codebook