Coding the header and footer