update permutations to eliminate unnecessary clone