Added code to main.js