add event filter function