use newly generated code to replace ugly hard code format in code