saved_ip function added