   function [B] = QRHes(A,shift)
%% function [B] = QRHes(A,shift)
%% applies one sweep of buldge chasing
%%to a hessenberg matrix.
    n = size(A,1);
    B = A - shift*eye(n); 
    col = 1;
    for j=2:n
      i = j-1;
      [c,s] = givensRot(B,i,j,col);
      fprintf(1,'  i:%d j:%d col:%d',i,j,col);
      fprintf(1,' *  c,s: %f  %f \n',c,s)
      B = givensApp(B,i,j,c,s,'left')
      pause 
      B = givensApp(B,i,j,c,s,'right')
      pause
      if (i>1),col=col+1; end 
    end
    B = B + shift*eye(n);
    
