add partition for quick sort