add codebook, fix typo