compiling version of get_gateway
working get_gateway?