updated KMeans with Heapds