fixed depracated code in main.js, however there should be refactor made