updated index.js to find location