removed the for loop in the public index.js