Re-implemented the plugin