quick sort variation