Update gateway.js