updated plugin.js