second quicksort function, this one for dicts