implemented BayesianQuantizationDistance