Making this work for header-footer