update not using heapsort for kruskal