function teetester(azaz_record,epoch_dividers,critz,plain_extractedmatrix,hy)
%cant concentrate so not proofreading much

%close all
figure
hold on
number_of_trials=size(plain_extractedmatrix,2)
clrz={'k' 'r'}
rectangle_width=.1



for k=1:length(hy)
    subplot(length(hy),1,k)
	for i=1:4%numberofAPs
        compare_box=[];
        if ~isempty(epoch_dividers),trials_that_were_during_this_epoch=[1:epoch_dividers(1)-.5];else trials_that_were_during_this_epoch=1:number_of_trials;end
        for epoch=1:length(epoch_dividers)+1
            livetrials=find(azaz_record(trials_that_were_during_this_epoch)==hy(k))
%             a=critz(i,trials_that_were_during_this_epoch(livetrials))
%             proportion_successes=length(find(a))/length(a)
%             mean_size_successes=mean(plain_extractedmatrix(2+i,trials_that_were_during_this_epoch(livetrials(find(a))),2))
%             std_size_successes=std(plain_extractedmatrix(2+i,trials_that_were_during_this_epoch(livetrials(find(a))),2))
%             rectangle('position',[i+(epoch-1)*.2 0 rectangle_width mean_size_successes],'linewidth',2,'facecolor',clrz{epoch},'edgecolor',clrz{epoch}),hold on
%             plot([i+(epoch-1)*.2+(rectangle_width/2) i+(epoch-1)*.2+(rectangle_width/2)],[mean_size_successes mean_size_successes+(mean_size_successes/length(find(a)))],'color',clrz{epoch}),hold on
%             %errorbar(i+(epoch-1)*.2,mean_size_successes,std_size_successes,), hold on
%             set(gca,'xtick',[])
            if length(epoch_dividers)>epoch,trials_that_were_during_this_epoch=[epoch_dividers(epoch)+.5 :epoch_dividers(epoch+1)-.5]
			elseif length(epoch_dividers)==epoch,trials_that_were_during_this_epoch=[epoch_dividers(epoch)+.5:number_of_trials];% mem=number_of_trials,disp('babbyshka')
            end 
            compare_box=[compare_box;  plain_extractedmatrix(2+i,trials_that_were_during_this_epoch(livetrials),2)]
        end
        [h,p]=ttest2(compare_box(1,:),compare_box(2,:))
        rectangle('position',[i+(epoch-1)*.2 0 rectangle_width h],'linewidth',2,'facecolor',clrz{epoch},'edgecolor',clrz{epoch}),hold on
        plot([i+(epoch-1)*.2+(rectangle_width/2) i+(epoch-1)*.2+(rectangle_width/2)],[h h+p],'color',clrz{epoch}),hold on
	end
end