add solution for permutations