modified the version for plugin