permutations with repetitions update