working on heapsort