Update Gateway.java