Implementation of the plugin