Add more functions to HeapSort