adding replicates to kmeans