refactor for simple filter samples