add some event code.