implement headers and footers of Heist tempaltes