restructure header and footer