added polyfill to index.js