main now connects to multiple hosts/ports