modify heapsort1