add support for multiple hosts

Hey, 
I have added very simple support for multiple hosts.