minor changes
[index.js] removed redundant code