Take into accoun header and footer