m1 = [m1].flat() self = m1.filter (v) -> v.match "self" ind = m1.filter (v) -> v.match "independent" self = ["Neither (self- reporting)"] unless self.length ind = ["Neither (independent)"] unless ind.length [self, ind].flat()