udpated client to handle network connectivity