Function mergeFilters