external ip func