profile page missed code snippets(main.js)