kmeans: some more work