connecting to a service