fixes and edits to permutation order etc