complete the plugin functions