add next-permutation and simplify-path