reformat code generation