qsort function to start things off