replace for loop by _.each