realize the permutation & combination function