finish the EXCG instruction of heapsort.