recoding the header and footer.