have basic permutation code working