added connect function to auto-connect to services