Working version of the plugin done