function [index, nameList] = findStringListIndex(name, nameList)
    index = 1;
    while ~strcmp(name, nameList{index})
        index = index + 1;
        if index > length(nameList)
            nameList{end+1} = name;
        end
    end
end
