finally understand permutation sequence