some changes in codebook againg