added structures needed for output buffering