add filter popups, build tables and get_filter function