changed iter type to combinations instead of permutations