changed client to handle whether ip and host is given in arguments