adds head and footer