Changing generation to use lambdas.