automatic reformat