add public_ip_address function