modifying index.js for heroku deployment