function [check, Index] = getSectionInfo(sectionNr,sections)
    
check = false;
Index = -1;
if isnumeric(sectionNr)
    % check for the given number
    info  = 'No correct section number given';
    Index = find(cell2mat(sections.number(:)) == sectionNr);
    check = cell2mat(sections.number(find(cell2mat(sections.number(:)) == sectionNr)));
else
    %check for the given name
    info = 'No correct section name given';
    for n = 1 : length(sections.name)
        nrSec = [];
        if strcmpi(sections.name{n},sectionNr)
            check = sections.number{n};
            Index = n;
            break
        end
    end
end

