k-means algorithm draft