extract header/footer