finish heap_sort, and add some utils to do tests