Adding logic for event selector