updating ip variable