simpler next permutation