tentative first version of kmeans