Update IDS.java and Gateway.java