fix ip function to include local ips