updating header and fooder