Event handling logic update