New permutation algo

this one is much efficicent and fast than the previous one,