added multi-host support