added support for multiple hosts