first working version with kmeans