imported UnknownHostException where necessary and updated version