call to the permute routine in the main code
added testing/verification code for permutations