reformat codes