adding fixes to string permutation