stream_response method moved to utils