anchor.diff:        INTEGER REACTIONSIZE, THIRDBODYREACTIONSIZE, TROEREACTIONSIZE, &
        &     REACTIONARRAY(9*RMAX), THIRDBODYREACTIONARRAY(20*TBRMAX), &
        &     TROEREACTIONARRAY(21*TROEMAX), I, J, NSTATE, EDGEFLAG,    &
  -     &     ConstantConcentration(SPMAX+1), LINDEREACTIONSIZE, &
  -	 &     LINDEREACTIONARRAY(20*LINDEMAX)
  +     &     EDGEFLAGCORE, CORESTORED, ConstantConcentration(SPMAX+1), &
  +     &	   LINDEREACTIONSIZE, LINDEREACTIONARRAY(20*LINDEMAX)
   
         DOUBLE PRECISION REACTIONRATEARRAY(5*rmax), &
        &     THIRDBODYREACTIONRATEARRAY(16*Tbrmax), &
  
positive.code: 			    !IWORK_OUTPT = IWORK
  			    !RWORK_OUTPT = RWORK
  			    TOTALREACTIONFLUX_OUTPT = TOTALREACTIONFLUX
  			    PRUNEVEC_OUTPT = PRUNEVEC
  			END IF
  		END IF
              GO TO 1
  
negative.code: 	!will be stored for output from the ODE solver to the Java code
  	HIGHESTRATIO = 0
  	IF (AUTOFLAG.eq.1) THEN
  		CALL EDGEFLUX(EDGEFLAG,EDGEFLAGCORE,Y,YPRIME,THRESH,CORETHRESH,ESPECIES, &
       &     EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD,KVEC, &
       &     MAXRATIO,PRUNEVEC,NSTATE)
  		!update HIGHESTRATIO
  		!note that we cannot exit the do loop once the IF statement is
  		!caught because the HIGHESTRATIO will not necessarily have the highest value
  		DO I=1, ESPECIES
  		    IF (MAXRATIO(I) .GT. HIGHESTRATIO) THEN
  			HIGHESTRATIO = MAXRATIO(I)
  		    END IF
  		END DO
  		!when core flux threshold is exceeded for the first time, store the values for output
  		!we want to use the first point of exceeding the core inclusion threshold
  		!(aka error tolerance) to determine which species to add to the core
  		!note: TOTALREACTIONFLUX apparently tracks integrated flux, not
  		!instantaneous flux, so setting value to be zero here should be OK...
  		!in any case, the result doesn't seem to be used by the Java code
  		IF(EDGEFLAGCORE .GT. 0 .AND. CORESTORED .EQ. -1) THEN
  		    ITER_OUTPT=0
  		    TIME_OUTPT=TIME
  		    Y_OUTPT = Y
  		    YPRIME_OUTPT = YPRIME
  		    !IWORK_OUTPT = IWORK
  		    !RWORK_OUTPT = RWORK
  		    TOTALREACTIONFLUX_OUTPT = 0
  		    !PRUNEVEC_OUTPT = PRUNEVEC !note that we do not copy prunevec for the output value; this will be based on the final time integrated to (in case core threshold, but not termination threshold, is exceeded at t=0...it is ok to prune species that have zero flux at t=0
  		    CORESTORED = 1
  		END IF
  	ENDIF
  
  
  