quick sort custom pivot