Adding Index.js to handle ranking