added main.js code