generator for qsort added