reformat code - index.js