write footer