add filter sample and refactor processor definition