added the ability to re-permutate bag whenever maximum permutations has been reached