updates for permutationII