added ::hostname arg to connect