add codebook, etc