sorting of array with heapsort NOT OK