code generator rework