added support for submultiple hosts when connecting