altered code for recurrence (editevent)
altered helper a bit