update kmeans and gap statistic