refactored plugin provider