more work on permutate values (not finished yet)