rewrite the plugin