Added gateway sketch