added codebook and fixed column bug