permute works