Adding wrapper code for plugin