delete repeated header and footer