first replace header/footer