function morphProd = pgeneratorlim(product,outputCell,litRoom)
global input
track = zeros(1,input);
presentLiterals = find(product~='-');

for k=1:size(outputCell,1)
    temp = outputCell(k,1:input);
    literals = find(temp ~='-');
    track(1,literals) = 1;
end

track(presentLiterals) = 0;
track = find(track >0);
morphProd = [];


if litRoom >= size(track,2)
    litRoom = size(track,2);
end

vec = [1 0];
reps = [litRoom numel(track)-litRoom];
    
pRecord = perms_reps(vec,reps);
database = dec2base(0:3^(litRoom)-1,3)-'0';

for i=1:size(pRecord,1)
    
    litChoose = pRecord(i,:).*track;
    litChoose(litChoose==0) = [];
    
    for t = 1:3^numel(litRoom)
        
        temp = product;
        tDatabase = database(t,:);
        counter = 1;
        
        for k=litChoose
            check = tDatabase(counter);
            switch check
                case 1
                    temp(k) = '1';
                case 2
                    temp(k) ='0';
            end
            counter = counter +1;
        end
        morphProd=[morphProd;temp];
    end
end


end % function end