refactor providers