implement generation according to config