reformat autogenerated template