add k-means algorithm