add callback feature for plugin