corrected main.js