modified kmeans++ module