permutate method now makes use of getRandomElements and has corresponding test