     getEventIndex: (eventId) =>
         index = null
         $.each @events, (key, value) ->
-            if value.id is eventId
-                index = key
+            if value._id is eventId then index = key
             index
         index
 


    getWeekNum: (dayNum, day, currentMonth, currentYear) =>
        # gets the week of the month which an event occurs
        self = @
        calendarInner = self.calendar.find "div.#{@calendarInnerClass}"
        weeks = calendarInner.find '.drm-week'
        firstDay = self.getDayOfWeek currentMonth, 1, currentYear
        dayShift = if firstDay is self.daysPerWeek then 0 else firstDay
        numberWeeks = self.getWeeksInMonth currentMonth, currentYear
        lastWeekLength = weeks.eq(numberWeeks).length

        if dayNum is 'last' and dayShift <= day

        eventDate = "#{fullDate.month} #{fullDate.date}, #{fullDate.year}"

        eventFrequency = do ->
            if events.recurrance is 'yearly' and events.dayNum?
                "Every #{events.dayNum} #{events.day} of #{events.month}"
            else if events.recurrance is 'yearly'
                "Every #{events.eventDate} of #{events.month}"
            else if events.recurrance is 'monthly' and events.dayNum?
                "Every #{events.dayNum} #{events.day} of the month"
            else if events.recurrance is 'monthly'
                "Every #{events.eventDate} of the month"
            else if events.recurrance is 'biweekly'
                "Every other #{events.day}"
            else if events.recurrance is 'weekly'
                "Every #{events.day}"
            else if events.recurrance is 'daily'
                "Every Day"
            else
                "One Time Event"
