changed the plugin to a more generic structure