added separate headers and footers depending on locality