now able to pass in a domain and port