refactored define plugin call