modified index and web.js to fit different devices