Continued with the generation algorithm.