use main.js for the JavaScript codes