add event namespace, add destroy function