fixing the program to get ips