Faster nextGen() method.