fixed the sovler... used combinations instead of permutations