function [] = presentQueries(varargin)
       % this  uses my 2nd  altern 
    images = readImages();
    srcimages = images;
    
    if (nargin > 0)
        srcimages = readRandomImages();
    end

    for imgindex = 1:size(images,2)
        %Display the image itself on one row...
        %The dimensions of the subplot were reversed in the description;
        %they should be 3, 8 (r,c), not 8, 3.
        subplot(3,8,imgindex)
        imshow(srcimages{imgindex})
        srchist = imhist(rgb2gray(srcimages{imgindex}), 256);
        text(0, -40, ['Original pictures']);
        %The top result on the second row...
        [topresult, secondresult] = query(srcimages{imgindex}, images);
        
        subplot(3,8,imgindex+size(images,2))
        imshow(topresult)
        tophist = imhist(rgb2gray(topresult), 256);
        text(0, -40, ['r: ' num2str(corr(srchist, tophist))]);
        
        %And the second result on the third row.
        subplot(3,8,imgindex+size(images,2)*2)
        imshow(secondresult)
        secondhist = imhist(rgb2gray(secondresult), 256);
        text(0, -40, ['r: ' num2str(corr(srchist, secondhist))]);
    end  
end