changed way to get ip address