function [newGrd,  next_hist_map] = NextMapMaker(hist_map, baseline, filt_disk)
    [~, LandWidth, window_length] = size(hist_map);
    constant_std = 0.3;
    w = ones(1,window_length); % weight matrix
    
    weightMat = zeros(LandWidth, LandWidth, window_length);
    for i=1:window_length
        weightLayer = w(i).*ones(LandWidth);
        weightMat(:,:,i) = weightLayer;
    end   

    sumGrd = sum(hist_map.*weightMat,3)./sum(w);    
    sumGrd = sumGrd./mean(sumGrd,'all');
    
    dev_mat = 0.3*sign(baseline-sumGrd).*abs(baseline-sumGrd).*(0.7 + 0.3*rand(LandWidth));

      newGrd = sumGrd + dev_mat + 2*randn(LandWidth);

    
    newGrd = imfilter(newGrd, filt_disk);

    newGrd = baseline*newGrd./mean(newGrd,'all');  % average change
    
    curr_std = std(newGrd,1,'all');    

    newGrd = (constant_std/curr_std)*(newGrd - mean(newGrd,'all'))+mean(newGrd,'all');    % std change
    
    
    newGrd = (newGrd+abs(newGrd))./2;
    
    tempBuffer = zeros(LandWidth, LandWidth, window_length);
    tempBuffer(:,:,(1:(window_length-1))) = hist_map(:,:, 2:window_length);
    tempBuffer(:,:,window_length) = newGrd;
    next_hist_map = tempBuffer;
    
end