can no longer use const for kmeans list, it modifies in place to save memory