event search function