update permutation