applied underscore.each to main.js