added proper handling of etcd and IP addresses