Application and implementation of kmeans algorithm