moved js function to main.js