refactoring PluginLoader