add random permutation function to the toolbox