made index.js work automatically.