finish heap sort