improved event handler
CHANGES