using underscore each function instead of jquery's