refactored plugin dispatch model