C                      PARAMETROS DA  BFGS                                      
                                                                                
C     X = VETOR DE COMPRIMENTO N CONTENDO NA ENTRADA O VALOR PONTO INICI        
C                                         NA  SAIDA  O VALOR PONTO FINAL        
C     MODE = 1 FAZ C/ QUE A APROXIMACAO INICIAL DA MATRIZ DE DERIVADAS          
C              DE SEGUNDA ORDEM ( HESSIANA ) SEJA COLOCADA AUTOMATICA/          
C              COMO UMA MATRIZ DIAGONAL POSITIVA EM FUNCAO DE 'SCALE'.          
C     SCALE = VETOR C/ N POSICOES ESPECIFICANDO VALORES CONVENIENTES DA         
C            MUDANCA ESPERADA EM CADA DIRECAO                                   
C     ACC = PRECISAO ( O CALCULO TERMINA QDO. P/ I=1, ... N                     
C           MUDANCAS EM X(I) DE TAMANHO ACC*SCALE(I) NAO REDUZEM                
C           O VALOR DA FUNCAO OBJETIVO)                            
C     IPRINT = PERIODO EM QUE SAO IMPRESSOS OS VALORES DE F X G                 
C     LP = LINE PRINTER                                                         
C     MAXFUN = NUMERO DE ITERACOES MAXIMO                                       
C     NFUN = NUMERO DE VEZES QUE A ROTINA E CHAMADA (SAIDA DE VA13C)            
                                                                                
C     X = VETOR DE COMPRIMENTO N CONTENDO NA ENTRADA O PONTO INICIAL DE         
C           PARTIDA E NA SAIDA O PONTO DE MINIMO DA FUNCAO                      
C     G = VETOR DE COMPRIMENTO N CONTENDO O VALOR DO GRADIENTE EM X             
C     W = VETOR DE TRABALHO DE COMPRIMENTO MINIMO N(N+13)/2                     
C            SAI C/ APROX. DA HESSIANA (ARMAZENADA NA FORMA FATORADA)           
 
      SUBROUTINE BFGS (N,X,F,G,SCALE,ACC,W)                                
      IMPLICIT REAL*8(A-H,O-Z)                                                  
      COMMON /VA13B/ IPRINT,LP,MAXFUN,MODE,NFUN                                 
      DIMENSION X(1),G(1),SCALE(1),W(1)
      ND=1+(N*(N+1))/2                                                          
      NW=ND+N                                                                   
      NXA=NW+N                                                                  
      NGA=NXA+N                                                                 
      NXB=NGA+N                                                                 
      NGB=NXB+N   
      CALL VA13C (FUNC,N,X,F,G,SCALE,ACC,W,W(ND),W(NW),                         
     1W(NXA),W(NGA),W(NXB),W(NGB))                                              
      RETURN                                                                    
      END                                                                       
      SUBROUTINE VA13C (FUNC,N,X,F,G,SCALE,ACC,H,D,W,XA,GA,XB,GB)               
      IMPLICIT REAL*8(A-H,O-Z)                                                  
      COMMON /VA13B/ IPRINT,LP,MAXFUN,MODE,NFUN                                 
      DIMENSION X(1),G(1),SCALE(1),H(1),D(1),W(1),                              
     1XA(1),GA(1),XB(1),GB(1)                                                   
      ABS(WW)=DABS(WW)                                                          
      SQRT(WW)=DSQRT(WW)                                                        
      IF(IPRINT.NE.0) THEN                                                 
        write(lp,1000)                                                  
 1000 FORMAT (/// , ' ENTRY TO VA13A') 
      ENDIF
C  CALCULATE THE INITIAL FUNCTION VALUE                                         
   10 CALL FUNMODA1 (N,X,F,G)     
   
      NFUN=1                                                                    
      ITR=0                                                                     
      NP=N+1                                                                    
C  SET THE HESSIAN TO A DIAGONAL MATRIX DEPENDING ON SCALE (.)                  
      IF (MODE.GE.2) GO TO 60                                                   
   20 C=0.                                                                      
      DO 30 I=1,N                                                               
30    C=DMAX1(C,DABS(G(I)*SCALE(I)))                                            
      IF(C.LE.0.) C=1.                                                          
      K=(N*NP)/2                                                                
      DO 40 I=1,K                                                               
   40 H(I)=0.                                                                   
      K=1                                                                       
      DO 50 I=1,N                                                               
      H(K)=0.01*C/SCALE(I)**2                                                   
   50 K=K+NP-I                                                                  
      GO TO 100                                                                 
C  FACTORIZE THE GIVEN HESSIAN MATRIX                                           
   60 IF(MODE.GE.3) GO TO 80   
   
      CALL MC11B (H,N,K)                                                        
      IF(K.GE.N) GO TO 100                                                      
   70 write(lp,1010)                                                                
 1010 FORMAT (/5X,'BECAUSE THE HESSIAN GIVEN TO VA13A IS NOT POS DEF,'/         
     15X,'IT HAS BEEN REPLACED BY A POSITIVE DIAGONAL MATRIX')                  
      GO TO 20                                                                  
C  CHECK THAT THE GIVEN DIAGONAL ELEMENTS ARE POSITIVE                          
   80 K=1                                                                       
      DO 90 I=1,N                                                               
      IF(H(K).LE.0.) GO TO 70                                                   
   90 K=K+NP-I                                                                  
C  SET SOME VARIABLES FOR THE FIRST ITERATION                                   
  100 DFF=0.                                                                    
      IPRA=IABS(IPRINT)                                                         
      IP=IABS(IPRA-1)                                                           
  110 FA=F                                                                      
      ISFV=1                                                                    
      DO 120 I=1,N                                                              
      XA(I)=X(I)                                                                
  120 GA(I)=G(I)                                                                
C  BEGIN THE ITERATION BY GIVING THE REQUIRED PRINTING.                         
  130 IP=IP+1                                                                   
      IF(IP.NE.IPRA) GO TO 140                                                  
      IP=0                                                                      
      write(lp,1020)  ITR, NFUN                                                    
 1020 FORMAT (/5X,'ITERATIONS=',I5,5X,'FUNCTIONS =',I5)                         
      write(lp,1030)  FA                                                          
 1030 FORMAT (5X,'F =' ,E15.7)                                                  
      IF(IPRINT.LE.0) GO TO 140                                                 
      write(lp,1040)   (XA(I),I=1,N)                                               
 1040 FORMAT (5X,'X(.) =',(7E15.7))                                             
      write(lp,1050)  (GA(I),I=1,N)                                               
 1050 FORMAT (5X,'G(.) =',(7E15.7))                                             
  140 ITR=ITR+1                                                                 
C  CALCULATE THE SEARCH DIRECTION OF THE ITERATION.                             
      DO 150 I=1,N                                                              
  150 D(I)=-GA(I)                                                               
      CALL MC11E (H,N,D,W,N)                                                    
C  CALCULATE A LOWER BOUND ON THE STEP-LENGHT.                                  
C  AND THE INITIAL DIRECTIONAL DERIVATIVE.                                      
      C=0.                                                                      
      DGA=0.                                                                    
      DO 160 I=1,N                                                              
      C=DMAX1(C,DABS(D(I)/SCALE(I)))                                            
  160 DGA=DGA+GA(I)*D(I)                                                        
C  TEST IF THE SEARCH DIRECTION IS DOWNHILL.                                    
      IF (DGA.GE.0.) GO TO 240                                                  
C  SET INITIAL STEP-LENGTH OF THE LINE SEARCH.                                  
      STMIN=0.                                                                  
      STEPBD=0.                                                                 
      STEPLB=ACC/C                                                              
      FMIN=FA                                                                   
      GMIN=DGA                                                                  
      STEP=1.                                                                   
      IF(DFF.LE.0.) STEP=DMIN1(STEP,1./C)                                       
      IF(DFF.GT.0.) STEP=DMIN1(STEP,(DFF+DFF)/(-DGA))                           
  170 C=STMIN+STEP                                                              
C  TEST WHETHER FUNC HAS BEEN CALLED MAXFUN TIMES.                              
      IF(NFUN.EQ.MAXFUN) GO TO 250                                              
      NFUN=NFUN+1                                                               
C  CALCULATE ANOTHER FUNCTION VALUE AND GRADIENT.                               
      DO 180 I=1,N                                                              
  180 XB(I)=XA(I)+C*D(I)                                                        
      CALL FUNMODA1 (N,XB,FB,GB)                                                    
      
C      write(lp,9020)  ITR, NFUN                                                    
C 9020 FORMAT (/' ponto interm. - ITERATIONS=',I5,5X,'FUNCTIONS =',I5)                         
C      write(lp,1030)  Fb                                                          
C      write(lp,1040)   (Xb(I),I=1,N)                                               
C      write(lp,1050)  (Gb(I),I=1,N)                                               

C  STORE THIS FUNCTION VALUE IF IT IS THE SMALLEST SO FAR.                      
      ISFV=MIN0(2,ISFV)                                                         
      IF(FB.GT.F) GO TO 220                                                     
      IF(FB.LT.F) GO TO 200                                                     
      GL1=0.                                                                    
      GL2=0.                                                                    
      DO 190 I=1,N                                                              
      GL1=GL1+(SCALE(I)*G(I))**2                                                
  190 GL2=GL2+(SCALE(I)*GB(I))**2                                               
      IF(GL2.GE.GL1) GO TO 220                                                  
  200 ISFV=3                                                                    
      F=FB                                                                      
      DO 210 I=1,N                                                              
      X(I)=XB(I)                                                                
  210 G(I)=GB(I)                                                                
C  CALCULATE THE DIRECTIONAL DERIVATIVE AT THE NEW POINT.                       
  220 DGB=0.                                                                    
      DO 230 I=1,N                                                              
  230 DGB=DGB+GB(I)*D(I)                                                        
C  BRANCH IF WE HAVE FOUND A NEW LOWER BOUND ON THE STEP LENGHT.                
      IF(FB-FA.LE.0.1*C*DGA)GO TO 280                                           
C  FINISH THE ITERATION IF THE CURRENT STEP IS STEPLB.                          
      IF(STEP.GT.STEPLB) GO TO 270                                              
  240 IF(ISFV.GE.2) GO TO 110                                                   
C  AT THIS STAGE THE WHOLE CALCULATION IS COMPLETE.                             
  250 IF(IPRINT.EQ.0) GO TO 260                                                 
      write(lp,1070)                                                                
 1070 FORMAT (/5X,'THE RESULTS FROM VA13A ARE AS FOLLOWS')                      
      write(lp,1020)  ITR, NFUN                                                   
      write(lp,1030)  F                                                           
      write(lp,1040) (  X(I),I=1,N)                                               
      write(lp,1050)   (G(I),I=1,N)                                                
      write(lp,1075)                                                                
 1075 FORMAT (////  '  ')                                                       
  260 RETURN                                                                    
C  CALCULATE A NEW STEP-LENGTH BY CUBIC INTERPOLATION.                          
  270 STEPBD=STEP                                                               
      C=GMIN+DGB-3.*(FB-FMIN)/STEP                                              
      C=GMIN/(C+GMIN-SQRT(C*C-GMIN*DGB))                                        
      STEP=STEP*DMAX1(1.D-1,C)                                                  
      GO TO 170                                                                 
C  SET THE NEW BOUNDS ON THE STEP-LENGTH.                                       
  280 STEPBD=STEPBD-STEP                                                        
      STMIN=C                                                                   
      FMIN=FB                                                                   
      GMIN=DGB                                                                  
C  CALCULATE A NEW STEP-LENGTH BY EXTRAPOLATION.                                
      STEP=9.*STMIN                                                             
      IF(STEPBD.GT.0.) STEP=0.5*STEPBD                                          
      C=DGA+3.*DGB-4.*(FB-FA)/STMIN                                             
      IF(C.GT.0.D0)STEP=DMIN1(STEP,STMIN*DMAX1(1.D0,-DGB/C))                    
      IF(DGB.LT.0.7*DGA) GO TO 170                                              
C  TEST FOR CONVERGENCE OF THE ITERATIONS.                                      
      ISFV=4-ISFV                                                               
      IF(STMIN+STEP.LE.STEPLB) GO TO 240                                        
C  REVISE THE SECOND DERIVATIVE MATRIX.                                         
      IR=-N                                                                     
      DO 290 I=1,N                                                              
      XA(I)=XB(I)                                                               
      XB(I)=GA(I)                                                               
      D(I)=GB(I)-GA(I)                                                          
  290 GA(I)=GB(I)                                                               
      CALL MC11A (H,N,XB,1./DGA,W,IR,1,0.0D0)                                      
      IR=-IR                                                                    
      CALL MC11A (H,N,D,1./(STMIN*(DGB-DGA)),D,IR,0,0.0D0)                         
C  BRANCH IF THE RANK OF THE NEW MATRIX IS DEFICIENT.                           
      IF (IR.LT.N) GO TO 250                                                    
C  BEGIN ANOTHER ITERATION.                                                     
      DFF=FA-FB                                                                 
      FA=FB                                                                     
      GO TO 130                                                                 
      END                                                                       
                                                                                
      SUBROUTINE MC11A (A,N,Z,SIG,W,IR,MK,EPS)                                  
      IMPLICIT REAL*8(A-H,O-Z)                                                  
      DIMENSION A(1),Z(1),W(1)                                                  
      ABS(WW)=DABS(WW)                                                          
      SQRT(WW)=DSQRT(WW)                                                        
C  UPDATE FACTORS GIVEN IN A BY  SIG*Z*ZTRANSPOSE.                              
      IF (N.GT.1) GO TO 1                                                       
      A(1)=A(1)+SIG*Z(1)**2                                                     
      IR=1                                                                      
      IF(A(1).GT.0.)RETURN                                                      
      A(1)=0.                                                                   
      IR=0                                                                      
      RETURN                                                                    
    1 CONTINUE                                                                  
      NP=N+1                                                                    
      IF (SIG.GT.0.) GO TO 40                                                   
      IF (SIG.EQ.0..OR. IR.EQ.0) RETURN                                         
      TI=1./SIG                                                                 
      IJ=1                                                                      
      IF (MK.EQ.0) GO TO 10                                                     
      DO 7 I=1,N                                                                
      IF (A(IJ).NE.0.) TI=TI+W(I)**2/A(IJ)                                      
    7 IJ=IJ+NP-I                                                                
      GO TO 20                                                                  
   10 CONTINUE                                                                  
      DO 11 I=1,N                                                               
   11 W(I)=Z(I)                                                                 
      DO 15 I=1,N                                                               
      IP=I+1                                                                    
      V=W(I)                                                                    
      IF (A(IJ).GT.0.) GO TO 12                                                 
      W(I)=0.                                                                   
      IJ=IJ+NP-I                                                                
      GO TO 15                                                                  
   12 CONTINUE                                                                  
      TI=TI+V**2/A(IJ)                                                          
      IF (I.EQ.N) GO TO 14                                                      
      DO 13 J=IP,N                                                              
      IJ=IJ+1                                                                   
   13 W(J)=W(J)-V*A(IJ)                                                         
   14 IJ=IJ+1                                                                   
   15 CONTINUE                                                                  
   20 CONTINUE                                                                  
      IF (IR.LE.0) GO TO 21                                                     
      IF (TI.GT.0.) GO TO 22                                                    
      IF (MK-1) 40,40,23                                                        
   21 TI=0.                                                                     
      IR=-IR-1                                                                  
      GO TO 23                                                                  
   22 TI=EPS/SIG                                                                
      IF (EPS.EQ.0.) IR=IR-1                                                    
   23 CONTINUE                                                                  
      MM=1                                                                      
      TIM=TI                                                                    
      DO 30 I=1,N                                                               
      J=NP-I                                                                    
      IJ=IJ-I                                                                   
      IF (A(IJ).NE.0.) TIM=TI-W(J)**2/A(IJ)                                     
      W(J)=TI                                                                   
   30 TI=TIM                                                                    
      GO TO 41                                                                  
   40 CONTINUE                                                                  
      MM=0                                                                      
      TIM=1./SIG                                                                
   41 CONTINUE                                                                  
      IJ=1                                                                      
      DO 66 I=1,N                                                               
      IP=I+1                                                                    
      V=Z(I)                                                                    
      IF (A(IJ).GT.0.) GO TO 53                                                 
      IF(IR.GT.0 .OR. SIG.LT.0. .OR. V.EQ.0.) GO TO 52                          
      IR=1-IR                                                                   
      A(IJ)=V**2/TIM                                                            
      IF (I.EQ.N) RETURN                                                        
      DO 51 J=IP,N                                                              
      IJ=IJ+1                                                                   
   51 A(IJ)=Z(J)/V                                                              
      RETURN                                                                    
   52 CONTINUE                                                                  
      TI=TIM                                                                    
      IJ=IJ+NP-I                                                                
      GO TO 66                                                                  
   53 CONTINUE                                                                  
      AL=V/A(IJ)                                                                
      IF (MM) 54,54,55                                                          
   54 TI=TIM+V*AL                                                               
      GO TO 56                                                                  
   55 TI=W(I)                                                                   
   56 CONTINUE                                                                  
      R=TI/TIM                                                                  
      A(IJ)=A(IJ)*R                                                             
      IF (R.EQ.0.) GO TO 70                                                     
      IF (I.EQ.N) GO TO 70                                                      
      B=AL/TI                                                                   
      IF (R.GT.4.) GO TO 62                                                     
      DO 61 J=IP,N                                                              
      IJ=IJ+1                                                                   
      Z(J)=Z(J)-V*A(IJ)                                                         
   61 A(IJ)=A(IJ)+B*Z(J)                                                        
      GO TO 64                                                                  
   62 GM=TIM/TI                                                                 
      DO 63 J=IP,N                                                              
      IJ=IJ+1                                                                   
      Y=A(IJ)                                                                   
      A(IJ)=B*Z(J)+Y*GM                                                         
   63 Z(J)=Z(J)-V*Y                                                             
   64 CONTINUE                                                                  
      TIM=TI                                                                    
      IJ=IJ+1                                                                   
   66 CONTINUE                                                                  
   70 CONTINUE                                                                  
      IF (IR.LT.0) IR=-IR                                                       
      RETURN                                                                    
C  FACTORIZE A MATRIX GIVEN IN A.                                               
      ENTRY MC11B (A,N,IR)                                                      
      IR=N                                                                      
      IF (N.GT.1) GO TO 100                                                     
      IF (A( 1).GT.0.) RETURN                                                   
      A(1)=0.                                                                   
      IR=0                                                                      
      RETURN                                                                    
  100 CONTINUE                                                                  
      NP=N+1                                                                    
      II=1                                                                      
      DO 104 I=2,N                                                              
      AA=A(II)                                                                  
      NI=II+NP-I                                                                
      IF (AA.GT.0.) GO TO 101                                                   
      A(II)=0.                                                                  
      IR=IR-1                                                                   
      II=NI+1                                                                   
      GO TO 104                                                                 
  101 CONTINUE                                                                  
      IP=II+1                                                                   
      II=NI+1                                                                   
      JK=II                                                                     
      DO 103 IJ=IP,NI                                                           
      V=A(IJ)/AA                                                                
      DO 102 IK=IJ,NI                                                           
      A(JK)=A(JK)-A(IK)*V                                                       
  102 JK=JK+1                                                                   
  103 A(IJ)=V                                                                   
  104 CONTINUE                                                                  
      IF (A(II).GT.0.) RETURN                                                   
      A(II)=0.                                                                  
      IR=IR-1                                                                   
      RETURN                                                                    
C  MULTIPLY OUT THE FACTORS GIVEN IN A.                                         
      ENTRY MC11C (A,N)                                                         
      IF(N.EQ.1) RETURN                                                         
      NP=N+1                                                                    
      II=N*NP/2                                                                 
      DO 202 NIP=2,N                                                            
      JK=II                                                                     
      NI=II-1                                                                   
      II=II-NIP                                                                 
      AA=A(II)                                                                  
      IP=II+1                                                                   
      IF (AA.GT.0.) GO TO 203                                                   
      DO 204 IJ=IP,NI                                                           
  204 A(IJ)=0.                                                                  
      GO TO 202                                                                 
  203 CONTINUE                                                                  
      DO 201 IJ=IP,NI                                                           
      V=A(IJ)*AA                                                                
      DO 200 IK=IJ,NI                                                           
      A(JK)=A(JK)+A(IK)*V                                                       
  200 JK=JK+1                                                                   
  201 A(IJ)=V                                                                   
  202 CONTINUE                                                                  
      RETURN                                                                    
C  MULTIPLY A VECTOR Z BY THE FACTORS GIVEN IN A.                               
      ENTRY MC11D (A,N,Z,W)                                                     
      IF (N.GT.1) GO TO 300                                                     
      Z(1)=Z(1)*A(1)                                                            
      W(1)=Z(1)                                                                 
      RETURN                                                                    
  300 CONTINUE                                                                  
      NP=N+1                                                                    
      II=1                                                                      
      N1=N-1                                                                    
      DO 303 I=1,N1                                                             
      Y=Z(I)                                                                    
      IF (A(II).EQ.0.) GO TO 302                                                
      IJ=II                                                                     
      IP=I+1                                                                    
      DO 301 J=IP,N                                                             
      IJ=IJ+1                                                                   
  301 Y=Y+Z(J)*A(IJ)                                                            
  302 Z(I)=Y*A(II)                                                              
      W(I)=Z(I)                                                                 
  303 II=II+NP-I                                                                
      Z(N)=Z(N)*A(II)                                                           
      W(N)=Z(N)                                                                 
      DO 311 K=1,N1                                                             
      I=N-K                                                                     
      II=II-NP+I                                                                
      IF (Z(I).EQ.0.) GO TO 311                                                 
      IP=I+1                                                                    
      IJ=II                                                                     
      Y=Z(I)                                                                    
      DO 310 J=IP,N                                                             
      IJ=IJ+1                                                                   
  310 Z(J)=Z(J)+A(IJ)*Z(I)                                                      
  311 CONTINUE                                                                  
      RETURN                                                                    
C  MULTIPLY A VECTOR Z BY THE INVERSE OF THE FACTORS GIVEN IN A.                
      ENTRY MC11E (A,N,Z,W,IR)                                                  
      IF (IR.LT.N) RETURN                                                       
      W(1)=Z(1)                                                                 
      IF (N.GT.1) GO TO 400                                                     
      Z(1)=Z(1)/A(1)                                                            
      RETURN                                                                    
  400 CONTINUE                                                                  
      DO 402 I=2,N                                                              
      IJ=I                                                                      
      I1=I-1                                                                    
      V=Z(I)                                                                    
      DO 401 J=1,I1                                                             
      V=V-A(IJ)*Z(J)                                                            
  401 IJ=IJ+N-J                                                                 
      W(I)=V                                                                    
  402 Z(I)=V                                                                    
      Z(N)=Z(N)/A(IJ)                                                           
      NP=N+1                                                                    
      DO 411 NIP=2,N                                                            
      I=NP-NIP                                                                  
      II=IJ-NIP                                                                 
      V=Z(I)/A(II)                                                              
      IP=I+1                                                                    
      IJ=II                                                                     
      DO 410 J=IP,N                                                             
      II=II+1                                                                   
  410 V=V-A(II)*Z(J)                                                            
  411 Z(I)=V                                                                    
      RETURN                                                                    
C  COMPUTE THE INVERSE MATRIX FROM FACTORS GIVEN IN A.                          
      ENTRY MC11F (A,N,IR)                                                      
      IF (IR.LT.N) RETURN                                                       
      A(1)=1./A(1)                                                              
      IF (N.EQ.1) RETURN                                                        
      NP=N+1                                                                    
      N1=N-1                                                                    
      II=2                                                                      
      DO 511 I=2,N                                                              
      A(II)=-A(II)                                                              
      IJ=II+1                                                                   
      IF(I.EQ.N) GO TO 502                                                      
      DO 501 J=I,N1                                                             
      IK=II                                                                     
      JK=IJ                                                                     
      V=A(IJ)                                                                   
      DO 500 K=I,J                                                              
      JK=JK+NP-K                                                                
      V=V+A(IK)*A(JK)                                                           
  500 IK=IK+1                                                                   
      A(IJ)=-V                                                                  
  501 IJ=IJ+1                                                                   
  502 CONTINUE                                                                  
      A(IJ)=1./A(IJ)                                                            
      II=IJ+1                                                                   
      AA=A(IJ)                                                                  
      IJ=I                                                                      
      IP=I+1                                                                    
      NI=N-I                                                                    
      DO 511 J=2,I                                                              
      V=A(IJ)*AA                                                                
      IK=IJ                                                                     
      K=IJ-IP+J                                                                 
      I1=IJ-1                                                                   
      NIP=NI+IJ                                                                 
      DO 510 JK=K,I1                                                            
      A(JK)=A(JK)+V*A(IK)                                                       
  510 IK=IK+NIP-JK                                                              
      A(IJ)=V                                                                   
  511 IJ=IJ+NP-J                                                                
      RETURN                                                                    
      END                                                                       
                                                                                
