codebook retrieval function