refactoring filter UI