modify quick sort