Changed number of parameters used in bic to k*DIM, since only centroids are adjusted in max(BIC).