changed influx gating script