modified main.js for responsiveness