refactor customerStateFilter