Test is now green for generate(9). Basic logic for the algorithm is implemented.