update the format of some old code