   # sort events so they are returned in same order as the ids
   events = eventIds.map (eventId)->
     _.findWhere(events, _id: eventId)
-  events.forEach (event) ->
+  events.forEach (event) =>
     if not event
       return
     if event.incidents

        locations: $not: $size: 0
    else
      query = utils.eventToIncidentQuery(event)
    if dateRange
      query['dateRange.start'] = $lte: dateRange.end
      query['dateRange.end'] = $gte: dateRange.start

        return null
      dailyDecayRate = 1.0
      if (@request.query.activeCases + "").toLowerCase() == "true"
        dailyDecayRate = Math.pow(.5, (1 / event.caseLengthDays))
      baseIncidents = []
      constrainingIncidents = []
      event.incidents.map (incident) ->
