modify PQ and heap sort