add raw pointer interface for codebook