refactored provider

so much refactor