refactoring filter panel