implementation of metapattern for every segment