simplify provider.js