don't use global variable for filter state and use user_data in pool