Added state to the plugin