Updated example event handler