       maxSubintervalsPerTopLocation = []
       locationToTotals = _.chain(locToSubintervals)
       .pairs()
-      .map ([key, locSubIntervals]) ->
+      .map ([key, locSubIntervals]) =>
         location = locationTree.getLocationById(key)
         groupedLocSubIntervals = _.groupBy(locSubIntervals, 'start')
         maxSubintervals = []

        countryCodeToCount[topLocation.countryCode] = prevTotal + locationToTotals[topLocation.id]

      if (@request.query.activeCases + "").toLowerCase() == "true"
        overallTimeseries = subIntervalsToActiveCases(maxSubintervalsPerTopLocation, dailyDecayRate)
      else
        overallTimeseries = _.chain(maxSubintervalsPerTopLocation)
          .groupBy('end')

        if location in topLocations
          maxSubintervalsPerTopLocation = maxSubintervalsPerTopLocation.concat(maxSubintervals)
        maxSubintervals = _.sortBy(maxSubintervals, (x) -> x.start)
        total = subIntervalsToActiveCases(maxSubintervals, dailyDecayRate).slice(-1)[0][1]
        return [key, total]
      .object()
      .value()
