modifilted heap_sort