I wrote a permutation code based on this info. Thanks, Ed!