Generate modified to generate all possible discretionary single, double and triple substitutions. Next is to do selection. IN terms of selection, use the existing rules to determine the weight function. As well use the lead as the context.