set defaultProvider automatically