reformat all the codes