add quick sort and permutation