put code in for qsort