initial input and qsort