add tempalte and header/footer