correct quick sort