added global_sort_results flag