first shot at implementing qsort