reformat header and footer