code and codebook

code and codebook