replace system message with event handler