refactoring filter form