add kmeans and gradientinfo