add support for plugins as pre and post hooks