moved back to non-template version of permutation