Added thread for filter logic