Introduction

With their large spatial demands and specific habitat requirements, umbrella species are common targets of conservation measures that should benefit multiple species in the same community (Simberloff 1998; Roberge and Angelstam 2004). The western capercaillie (Tetrao urogallus) is an effective umbrella species for red-listed mountain birds (Suter et al. 2002) and a good candidate for specialist birds in taiga forests (Pakkala et al. 2003). Typically, T. urogallus habitat consists of semi-open, well-structured coniferous forest with trees of varying ages, and particularly old stands with decaying wood, as well as well-developed dwarf-shrub vegetation (Storch 2007; Lentner et al. 2022). The species is closely associated with the structure of the forest, needing open gaps for mating displays and rich ground cover with Vaccinium berries for feeding (Storch 2007). Adults feed mostly on leaves, buds, flowers, and fruits in summer and conifer needles in the winter, while chicks rely on invertebrates (Storch 2007). In Central Europe, the distribution range of T. urogallus is mainly limited to mountain forests (Storch 2007). Because of habitat loss and fragmentation, many of the populations in Central Europe are small and isolated (Storch 2007; Segelbacher et al. 2008; Keller et al. 2020), so that priorities for conservation are preserving habitat, maintaining connectivity, and reducing human disturbance (Storch 2007). The conservation status for Europe was evaluated as of Least Concern with an decreasing population trend (IUCN 2016), while the species is listed as threatened in Western, Central, and South Eastern European countries (Storch 2007; Dvorak et al. 2017) and is included in Annex I of the European Birds Directive (79/409/CEE).

Given the conservation status of T. urogallus and its role as umbrella species (Suter et al. 2002), monitoring is a valuable instrument to assess population trends and responses to management actions. Traditionally, counts of males at leks have been used to estimate population size (Lentner et al. 2018; Abrahams 2019). Starting in late winter, males display collectively in lek sites to attract the females (Storch 2007). This method might underestimate population size (Jacob et al. 2010; Aleix-Mata et al. 2019), since young individuals that are not showing lekking behaviour or using only peripheral territories can be overlooked (Abrahams 2019; Aleix-Mata et al. 2019). Furthermore, certain methodological standards (e.g. simultaneous counts) and the experience of observers (Lentner et al. 2018) may differ among studies, which has impacts on the estimations. Alternatively, genetic analysis of non-invasive samples (e.g. faeces, feathers) has become increasingly popular to study population size and structure of T. urogallus and is commonly used for monitoring (Jacob et al. 2010; Morán-Luis et al. 2014; Rösner et al. 2014; Mollet et al. 2015; Bañuelos et al. 2019).

Since 2011, an extensive grouse-monitoring project has been taking place in Tyrol, in the eastern part of the European Alps (Masoner 2012; Lentner et al. 2018; Vallant et al. 2018), investigating two grouse species (T. urogallus and the black grouse, Lyrurus tetrix). Four reference areas covering 1100 km2 were established to investigate 5–10% of the grouse populations in Tyrol in a 5-year cycle (Lentner et al. 2018). Each year, one of the reference areas is systematically searched for faeces and feathers using a transect mapping approach. Additionally, synchronous counts at known lek sites are performed. This is done in intensive sampling sites that cover yearly a total area of 1112–1418 ha for T. urogallus. Genetic analysis of the collected samples allows to determine individuals and to estimate population sizes through a mark-recapture method (Pennell et al. 2013; Lentner et al. 2018). The currently estimated population size of T. urogallus in Tyrol is 1700–2300 cocks (Lentner et al. 2022). Via a standardised sampling protocol and repetition every 5 years (1 year break after a completed round), this monitoring aims at observing changes of grouse population over a longer time period. Furthermore, a main aim of the project is to calibrate and validate the conventional lek counts of the 5-year regional grouse monitoring of the Tyrolean Hunters’ Association by comparison with the population estimates based on genetic data from selected reference areas.

In this pilot study, we analysed non-invasive T. urogallus samples collected in 2019 in a reference area in East Tyrol as part of the Tyrolean grouse monitoring using multi-locus genotyping. We aimed to compile a set of analyses that could be a starting point for the analysis of the complete monitoring data from 2011 to 2019 for both T. urogallus and Lyrurus tetrix. We analysed population structure using Bayesian cluster analysis and calculating population differentiation. Also, mobility patterns and differences between males and females were investigated comparing pairwise relatedness between individuals, genetic diversity, and inbreeding. Furthermore, multiple linear regressions were used with a set of explanatory variables (habitat parameters) and response variables (genetic parameters) to find which habitat parameters explain variation in genetic diversity.

Materials and methods

Sampling

Fieldwork was conducted in East Tyrol (Austria) from end of March to end of April 2019. As part of the grouse monitoring in Tyrol, a reference area of 38,286 ha was defined in Defereggen valley and the front part of Virgen valley. In this area, 11 sampling sites (Fig. 1; mean area: 100 ha, standard deviation: 49 ha) were systematically searched for faeces and feathers of T. urogallus along transects about 100 m in altitude apart from each other (and 100 m of horizontal distance on flat terrain) covering the complete sampling site. These two different transect distances were chosen to be able to map both steep and flat terrain, with steep terrain representing the vast majority of all terrain sampled here. The surveyors followed isohypses but adjusted their paths to include relevant habitat structures (stands of old and dead coniferous trees and lek sites). For each sample, GPS coordinates were noted using Garmin GPSMAP 64sx and comparable devices of the same product series. To reduce researcher and sampling bias, each sampling site was visited a second time after 16–19 days by a different surveyor using a transect route different from that used in the first survey.

Fig. 1
figure 1

Locations of Tetrao urogallus samples in East Tyrol. Circles represent faeces and feathers (n = 251) collected along transects in eleven monitoring sampling sites. Every site was visited twice by different surveyors, and transect routes covered the whole sampling sites. Inset: distribution of T. urogallus from BirdLife International and Handbook of the Birds of the World (2019) Bird species distribution maps of the world. Version 2019.1. Available at http://datazone.birdlife.org/species/requestdis

In total, 651 faeces and feathers were collected. For the molecular-genetic analyses, the number of samples for each sampling site was chosen proportionally to its area among all samples collected from that site, to achieve a total sample size of 251 [n (faeces) = 245; n (feathers) = 6], which corresponds to the sample size of the grouse monitoring. Sampling points were defined as circular areas of 50 m diameter, and for any sampling point, only one sample was analysed unless definitively belonging to different individuals. This was the case for samples that could be assigned to male or female individuals based on their size (faeces) or colour (feathers), as noted on field protocols. Priority was given to fresh samples collected on snow. Samples were equally distributed between sampling rounds.

DNA extraction and genotyping

DNA from faeces samples was extracted using the QIAamp Fast DNA Stool Mini kit (Qiagen, Hilden, Germany) following the protocol of the manufacturer. For feather samples, the QIAamp DNA Mini Kit (Qiagen) was used with the modifications described by Vallant et al. (2018). Eluted DNA was stored at − 20 °C.

Samples were genotyped three times using eleven microsatellite markers (Table 1) and two additional sex markers, Tt_Wa and Tt_Za (Haider et al. 2023), targeting the CHD gene. Markers were organized into three multiplex PCR sets (Table 1).

Table 1 Summary of PCR multiplex sets (MPX)

PCRs were done using the multiple tube approach (Taberlet et al. 1996) on a UnoCycler (VWR, USA) in 10 µl reaction volume with 1 µl template DNA, 1× Qiagen Multiplex PCR Master Mix, 0.6 µl non-acetylated BSA (2.5 µg/µl; Thermo-Fisher), 3 mM MgCl2, 0.16 µM of each primer, and RNase-free water (Qiagen). Cycling conditions were as follows: initial denaturation at 95 °C for 15 min, 37 cycles of denaturation at 94 °C for 30 s, annealing at 56 °C for 120 s, elongation at 72 °C for 30 s, and final extension at 72 °C for 45 min. Negative and positive controls were included as well as allelic ladders (Andesner et al. 2021).

Fragments were sized by capillary electrophoresis at University of Chicago Comprehensive Cancer Center DNA Sequencing & Genotyping Facility (Chicago, USA). Allele calling was done using GeneMarker v2.7 (SoftGenetics, State College, PA, USA). If for a particular marker a sample failed completely, did not reach the minimum signal intensity, and/or did not show clear peaks, the marker was classified as missing for this sample.

Species and genotype determination

Species identification was done based on distinct allele-sizes ranges for loci BG15, BG19, and sTuT2 (Vallant et al. 2018). Unique genotypes were identified using the R package allelematch v2.5.1 (Galpern et al. 2012) allowing for three mismatches. Allowed number of mismatches was determined using the implanted function amUniqueProfile. To check the individualization, probability of identity (Pi) and probability of identity for siblings (Pisib) were calculated with GeneCap v1.4 (Wilberg and Dreher 2004).

Population genetics

Loci were tested for linkage disequilibrium and deviation from Hardy–Weinberg equilibrium (HWE) with probability tests implemented in Genepop (Rousset 2008). Bonferroni–Holm correction was applied for multiple comparisons (Holm 1979). For the following analyses, only one sampling site was randomly selected for genotypes found at several sampling sites. All calculation using R packages were done in R v4.2.3 (R Core Team 2023).

Inbreeding coefficient (FIS) and pairwise fixation index (FST) were calculated using the package hierfstat v0.5-11 (Goudet 2005). Individual inbreeding was estimated as multi-locus heterozygosity (MLH) and mean squared distance between alleles (d2) (Coulson et al. 1998). The packages adegenet v 2.1.10 (Jombart 2008) was used to calculate observed heterozygosity (HO). Allelic richness (AR) was calculated using PopGenReport v3.0.4 (Adamack and Gruber 2014). Calculations were done also for males and females separately. Differences between sexes were tested by Mann–Whitney U test using the package rstatix v0.7.2 (Kassambara 2023).

Isolation by distance (IBD) in males and females was tested using Mantel tests (9999 permutations) in ade4 v1.7-15 (Chessel et al. 2004). Geographic and Edward’s genetic distances (Edwards 1971) between the individuals were calculated using geosphere v1.5-10 (Hijmans et al. 2019) and poppr v2.8.6 (Kamvar et al. 2014), respectively.

Pairwise relatedness between individuals was estimated by the coefficients implemented in the R package related v1.0 (Pew et al. 2015). Relatedness within sites and between sites for males and females separately were compared using Mann-Whitney U test using the R package rstatix v 0.7.2 (Kassambara 2023).

A Bayesian cluster analysis was performed in STRUCTURE v2.3.4 (Pritchard et al. 2000) using an admixture model with correlated allele frequencies, 1,000,000 generations burn-in, and 4,000,000 MCMC generations with 10 replicates. The most likely number of clusters was determined by ΔK (rate of change of probability between the different numbers of populations used) (Evanno et al. 2005) using the R package pophelper v2.0.3 (Francis 2017).

Habitat and genetic diversity

Two habitat suitability models were developed for the grouse monitoring Tyrol (Masoner 2012; Lehne 2014; Lentner 2017). The first is an ecological niche model generated using MaxEnt (Phillips et al. 2004), expressing the potential habitat suitability for T. urogallus as a probability. The second represents habitat suitability as a score resulting from expert assessment of landscape parameters (Exp) (Masoner 2012; Lehne 2014; Lentner 2017). Data were provided by Michael Haupolter, Regional Government of Tyrol, Department of Environmental Protection – tiris (geographical information system of Regional Government of Tyrol). In order to consider the total number of genotypes per site, all detected sampling sites for a genotype were used for the modelling.

Linear regressions were used to determine the effect of habitat parameters on genetic diversity. Explanatory variables were: area, perimeter, shape (perimeter/area), two habitat suitability models (MaxEnt and Exp), isolation measures Hanski (MaxEnt) and Hanski (Exp) (Hanski et al. 1994), and mean distance to other sites.

For the two isolation measures of sampling sites, Hanski (MaxEnt) and Hanski (Exp), Hanski‘s I4 (Hanski et al. 1994) was modified to include habitat suitability (Hanski et al. 1994; Rabasa et al. 2007): \({I4}_{i} = {\sum }_{j\ne i}{e}^{-\alpha *{d}_{ij}}\text{*}{A}_{j}\text{*}{S}_{j}\), where \({d}_{ij}\) is the distance between sites \(i\) and \(j\) (km), \({A}_{j}\) the area (ha) of site \(i\), \(\alpha\) the reciprocal of the average dispersal distance (5 km), and \({S}_{j}\) the habitat suitability of site \(j\). The measure was calculated for both habitat suitability models.

Response variables were d2, MLH, FIS, AR, HO, and the number of genotypes (N.genotypes). Since the number of genotypes depends largely on the number of samples analysed, which is proportional to the area of the sites, number of genotypes divided by area was added to the response variables.

First, simple linear regressions were calculated for every combination explanatory/response variable. Then, multiple linear regressions were used for number of genotypes divided by area. To identify the subset of habitat parameters that best explained these variables, stepwise model selection was performed. The best model was chosen based on Akaike Information Criterion (AIC).

Results

Species and genotype determination

In total, 251 samples were analysed; five were determined as Lyrurus tetrix, two as Tetrastes bonasia, 239 as Tetrao urogallus, and the remaining five could not be genotyped for a sufficient number of species-specific loci to allow determination. Unique genotypes were identified using 236 T. urogallus samples that were genotyped successfully at ≥ 8 loci; we found 55 males and 28 females of T. urogallus (Supplementary Table 1). Each genotype was found 2.9 times on average (males: 3.5, females: 1.6), 36 were found only once, 45 multiple times (males: max = 17, mean = 5.0; females: max = 6, mean = 2.6). The maximum distance between recaptured genotypes was 5.5 km for males and 2.5 km for females. Pid and Psib were 2.93 × 10−10 and 3.69 × 10−4, respectively.

Population genetics

Loci were tested for deviation from HWE and for linkage disequilibrium. Based on significant deviation from HWE, locus mTuT1 was excluded from further analyses. Pairwise FST values between sites were small with only a few high values (FST > 0.05) between sites where only one individual was found (Tu_27, highest value 0.15) and non-significant, without clear geographic patterns of differentiation (Fig. 2).

Fig. 2
figure 2

Pairwise FST (fixation index) values between sampling sites of Tetrao urogallus in East Tyrol. Colours indicate value of FST. Highest FST was 0.15 between Tu_27 and Tu_32

Multi-locus heterozygosity and FST were significantly different between females and males (Fig. 3d, f; Mann-Whitney U test: W = 613, p = 0.001; W = 1068, p = 0.003). We found no significant difference in AR (W = 32, p = 0.19), d2 (W = 694, p = 0.47), FIS (W = 53, p = 0.85), nor HO (W = 63, p = 0.34) between females and males (Fig. 3).

Fig. 3
figure 3

Comparisons of genetic diversity and inbreeding between females (F) and males (M) of Tetrao urogallus. None of the calculated values were significantly different between sexes except multi-locus heterozygosity (MLH; f). AR allelic richness, a d2 mean squared distance between alleles, b FIS inbreeding coefficient, c FST fixation index, d HO observed heterozygosity, e Dots represent mean values, error bars standard deviation. Significance level of Mann–Whitney U test: **p < 0.01

IBD was statistically significant for males but not for females (Mantel test males: r = 0.068, p = 0.03; females: r = − 0.056, p = 0.88, Fig. 4).

Fig. 4
figure 4

Isolation by distance (IBD) for a males and b females of Tetrao urogallus with regression line. Warmer colours indicate higher density of points. a There is a significant increase of genetic distance over geographic distance in males, whereas b in females the result is not significant. Significance level of Mantel test: ns p > 0.05, *p ≤ 0.05

Pairwise relatedness for males within sampling sites was significantly higher than for males from different sites for three out of the seven relatedness coefficients calculated (Fig. 5, Supplementary Fig. 1). No difference was found for females (Fig. 5, Supplementary Fig. 1).

Fig. 5
figure 5

Comparison of relatedness coefficients using different methods [Lynch–Ritland (Lynch and Ritland 1999) and Queller–Goodnight (Queller and Goodnight 1989)] for males (a, c) and females (b, d) of Tetrao urogallus. a, b There was no differences between inter and intra relatedness using Lynch–Ritland. c, d In males, intra relatedness was significantly higher than inter relatedness. In females, no difference was detected. Inter: between sampling sites, intra: within sampling sites. Dots represent mean values, error bars standard deviation. Significance levels of Mann–Whitney U test: *p < 0.05

ΔK statistics indicated a best value of K = 4 for Bayesian clustering (Supplementary Fig. 2). The population showed complete admixture (Fig. 6). The same was observed for other values of K (Fig. 6).

Fig. 6
figure 6

Microsatellite population structure of Tetrao urogallus inferred by STRUCTURE for K = 2 to K = 6 groups. Best value of K = 3 indicated by asterisk. We see a single well mixed population with no clear structure over all values of K

Habitat and genetic diversity

Simple linear regressions were used to find the most appropriate response variables among genetic parameters. Regressions were significant for N.genotypes (Table 2).

Table 2 Linear regressions between genetic and habitat variables

Since this parameter is strongly affected by the area of the sampling site because of sampling design, density of genotypes (N.genotypes/area) was used for the multiple linear regressions. The best model (stepwise selection) contained Hanski isolation measure calculated using the expert model and shape of the sampling site (perimeter/area) (Table 3).

Table 3 Multiple linear model for density of Tetrao urogallus genotypes in the sampling sites of this study

Discussion

In this pilot study, we tested various data-analysis methods for non-invasive samples of Tetrao urogallus from East Tyrol to investigate population structure and mobility using ten polymorphic microsatellite markers. The relationship between habitat parameters and genetic diversity was also analysed using linear regressions. The markers discriminated well among individuals with probability of identity (Pi) and probability of identity for siblings (Pisib) lower than the recommended values (10−2 − 10−4) (Waits et al. 2001). We also genotyped each sample three times to minimize the error rates (Taberlet et al. 1996; Beja-Pereira et al. 2009) and saw only minor differences (mainly a minimized number of failed alleles), indicating that the marker set used is very reliable (Supplementary Table 2).

Locus mTuT1 deviated significantly from Hardy-Weinberg equilibrium (HWE) and was subsequently excluded from population genetic calculations. A deviation from HWE across multiple loci could be explained by population stratification, assortative mating, and/or poor DNA quality causing allelic dropout. Since only one locus was affected, it is more likely that null alleles are responsible, as found in other studies using this marker (Jacob et al. 2010; Vallant et al. 2018).

Population structure

Our results suggest that the individuals analysed belong to a single well-mixed population. Low values of the fixation index FST indicate a high level of gene flow among the sampling sites without clear geographical pattern (Fig. 2). However, there is an exception with high pairwise FST values observed in the Tu_27 and Tu_32 sampling sites, which can be explained by the number of individuals found there. Although even FST values smaller than 0.05 could indicate some differentiation (Balloux and Lugon-Moulin 2002), the STRUCTURE clustering showed complete admixture at all K values analysed (Fig. 6). However, one has to be aware that gene flow as parameter for differentiation cannot provide insight in e.g. the demographic history (Marko and Hart 2011). In our case, the sampling sites are likely well connected, and the area investigated is relatively small, with a maximum distance between sites of 23 km. Furthermore, the sites do not represent distinct habitat fragments. On the one hand, (Rösner et al. 2014) found that movement of single capercaillies of up to 30 km can maintain gene flow across larger distances (up to 85 km) in the Bohemian Forest. On the other hand, significant differentiation has been observed for a fragmented population in the Black Forest (Germany) even at fine spatial scale (Segelbacher et al. 2008). It is possible that the complex topography does not allow free dispersal in our study area with high mountain ranges does not allow free dispersal, in contrast to the Bohemian and the Black Forest (Segelbacher and Storch 2002). Nevertheless, this does not seem to significantly limit gene flow at the scale we studied.

Mobility patterns

The low FST values and the results of the STRUCTURE clustering reflect high connectivity and ongoing gene-flow among sampling sites. This is also supported by the recapture of single individuals at multiple sites, with a maximum air-line distance of 5.5 km between recaptures. In previous years of the monitoring, the longest distance recorded was 10.2 km (Lentner 2017). Since sampling was conducted over three weeks in the mating season, this result could reflect short-term movement rather than dispersal patterns. Storch (2007) found that juveniles and subadult capercaillies visited several leks and had larger home ranges, while adult males occupied smaller, overlapping territories closer to lek centres. Females also visited multiple leks (Storch 1997).

Our results suggest sex-specific differences in movement patterns. While most comparisons of inbreeding and genetic diversity were not statistically significant, MLH and FST were significantly different between the sexes with higher MLH and lower FST in females than males (Fig. 3). This could be explained by immigration of females from a population that has higher heterozygosity. Another measure of individual inbreeding, d2, did not differ between males and females and showed high variability within groups (Fig. 3). Few highly heterozygous loci might control individual values of d2, whereas the value of MLH is influenced by a larger number of loci (Hansson 2010), possibly leading to different results. Females within a site and from different sites were similarly related. In contrast, relatedness was higher for males from the same site for most of the calculated coefficients, suggesting some degree of differentiation from limited movement of males (Fig. 5, Supplementary Fig. 1). Similarly, our analysis of IBD supports female-biased dispersal and male philopatry, with genetic distance increasing significantly with geographic distance in males and no trend in females (Fig. 4). Overrepresentation of closely related males visiting lek sites in the mating season (Segelbacher et al. 2007; Cayuela et al. 2021) was likely avoided through standardized transect sampling.

Sex-biased dispersal occurs when one sex is more philopatric than the other and tends to breed in its natal site or social group (Greenwood 1980). Female-biased dispersal is common among most bird families, while male-biased dispersal is predominant in mammals (Greenwood 1980; Pusey 1987; Mabry et al. 2013). Using genetic data, dispersal bias can be detected by comparing markers with different inheritance (e.g. mitochondrial and nuclear) or sex-specific patterns of genetic distance for bi-parentally inherited markers (Goudet et al. 2002; Prugnolle and de Meeus 2002). Corrales and Höglund (2012) showed that dispersing females maintain gene flow in a panmictic L. tetrix population in northern Sweden. Evidence of female-biased dispersal in T. urogallus was found in the Vosges Mountains (eastern France), in the Bohemian Forest (Germany and Czech Republic), and in the Black Forest (Germany) (Segelbacher et al. 2008; Rösner et al. 2014; Cayuela et al. 2021). In contrast, Mäki-Petäys et al. (2007) found roughly equal dispersal in T. urogallus in northern Finland by looking at IBD patterns of pairwise FST among lek sites over distances up to 350 km. Factors such as dispersal rate, bias intensity, and sampling scheme affect the power of inference of sex-biased dispersal based on genetic data (Goudet et al. 2002). Additionally, different spatial scales of sampling can influence the outcome of such tests (Yannic et al. 2012; Vangestel et al. 2013).

Habitat and genetic diversity

We found no statistically significant relation between habitat parameters and genetic diversity, except for the number of genotypes per sampling site. Given the close relationship between number of genotypes and number of samples analysed, density of genotypes was used in the multiple linear regression to account for this. Several of the explanatory variables were strongly autocorrelated (Supplementary Fig. 3), partly because the sampling sites were relatively similar in these variables. For example, all sampling sites had approximately the same shape, leading to correlation of area and perimeter. Also, mean habitat suitability was similar across sites. Shape of the sampling site (perimeter/area) and the isolation measure calculated using the expert model explained differences in density of genotypes among sampling sites (Table 3). In this study, sampling sites are not isolated patches in an unsuitable matrix; instead, they are adjacent to areas with similar habitat suitability. Narrower sampling sites have larger values of the perimeter/area metric. The positive relationship between density of genotypes and this metric of shape could be explained by the larger area of contact to neighbouring potential habitat. Habitat suitability models were not included directly, but the expert model was included as part of the isolation measure. The density of genotypes was negatively affected by isolation of the sites. This result seems relevant for conservation in principle, but we note that further work is still required: firstly, in-depth analyses of the basically suitable (but unsampled) habitat connecting sampling sites to check if the number and thus relevance of possible barriers correlates with the linear distance between sites, and secondly, corroboration by additional data from the other reference areas of the monitoring project in Tyrol. Should the result be confirmed, this would be of relevance for nature conservation in the future and should be considered in habitat management planning. However, in the context of this case study, the specific result is less relevant than demonstrating the feasibility of the statistical approach, which would also be given if no significant result at all had emerged from the limited data used here.

In this study, we showed that the investigated T. urogallus population is well mixed and likely well connected to populations from neighbouring valleys. We also found sex-specific mobility patterns, supporting female-biased dispersal. We demonstrated the general feasibility of the modelling approach using habitat parameters, which will be used for the analysis of the complete monitoring dataset including three more sites and one additional species (Lyrurus tetrix). We refrain from interpreting the results presented here in detail as this is only one out of four areas of the ongoing grouse-monitoring project in Tyrol. For the analysis of data from multiple areas and years, more complex statistical instruments will be available, including random effects, which may increase the sensitivity of the approach and allow to identify more general patterns.