add some logic to add filter