add heap sort but buggy