update heapsort