implemented findEventByTask and findEventByMileage