added an iffe to index.js