I think this functionality should be outside of the plugin.