upgrade permutation sequence