function [cellOfTops, path, listOfImageNames, hasChanged] = getEmptyCellOfTops(app)
 path = uigetdir;
 if ~ischar(path) && ischar(app.PathToFolder) && ~isempty(app.CellOfTops)  && ~isempty(app.ListOfImageNames) 
     listOfImageNames = app.ListOfImageNames;
     path = app.PathToFolder;
     cellOfTops = app.CellOfTops;
     hasChanged = 0;
     return;
 elseif path == 0
     listOfImageNames = [];
     path = [];
     cellOfTops = [];
     hasChanged = 0;
     return;
 end
 fileStruct = dir(path);
 A = {fileStruct.name};
 indx = [];
 num = '';
 for i = 1:length(A)
     for n = 1:length(A{i}(:))
         if A{i}(n) ~= 'i' && A{i}(n) ~= 'j'
            actChar = str2double(A{i}(n));
         else
             actChar = 'NaN';
         end
       if isnumeric(actChar) && ~isnan(actChar)
           num(end+1) = num2str(actChar);
       end
     end
     if ~isempty(num)
        indx(end+1) = str2double(num);
        num = '';
     end
 end
 maxIndx = max(indx);
 cellOfTops = cell(1,maxIndx);
 listOfImageNames = {};
 for n = 1:length(A)
    numOfPhoto = regexp(A(n),'\d*','Match');
     if ~isempty(numOfPhoto{1})
         numOfPhoto = numOfPhoto{1};
        numOfPhoto = str2double(char(numOfPhoto{1}));
        cellOfTops{numOfPhoto}{end+1} =  {};
        listOfImageNames{end+1} = char(A(n));
     end
 end
 listOfImageNames = natsort(listOfImageNames);
 hasChanged = 1;

end