added comments in main.js just for demo