fix quicksort and add the attr1 to it