add pub event func