swap pivot and first elem