compare() + qsort() implemented