update permutation algor