reformat functions