changes send_response to output_filter