rename S8 to permutation
added size argument.
added a test.