about to switch to a single-codebook method
single codebook quantization looks like it's working