now can handle gateway names instead of addresses