use better output buffering