added ability for delegate to add header and footer