Update main.js

Add some code