heapsort version 6