removed references to ipaddress library as it does not exist in older versions of python