refactor checkbox filter