finally finished the plugin