init headers and footers