Update Gateway.py