public function groupsExtract(string $start = 'LIN', array $barrier = ['UNS']): array
    {
        // init
        $groups = [];
        $group = [];
        $position = 'before_search';

        foreach ($this->getParsedFile() as $edi_row) {
            $segment = $edi_row[0];
            if (
                $position == 'group_is'
                &&
                (
                    $segment == $start
                    ||
                    \in_array($segment, $barrier, true)
                )
            ) {
                // end of group
                $groups[] = $group;
                // start new group
                $group = [];
                $position = 'group_finish';
            }

            if ($segment == $start) {
                $position = 'group_is';
            }

            // add element to group
            if ($position == 'group_is') {
                $group[] = $edi_row;
            }
        }

        return $groups;
    }