Permutation Match (working, as far as I can tell)