Adding hooks to the plugin