implemented a permutation over a list of nodes and a random picker