refactoring popover in filters