set header and footer before adapter