anchor.diff:          else
               call unpack_extra_info(s)
           end if
  -              
  -! set ROTATION: extra param are set in inlist: star_job
  -        rot_full_off = s% job% extras_rpar(1) !1.2
  -        rot_full_on = s% job% extras_rpar(2) !1.8
  -        
  -        if (s% job% extras_rpar(3) > 0.0) then
  -            if (s% star_mass < rot_full_off) then
  -                frac2 = 0
  -                write(*,*) '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
  -                write(*,*) 'no rotation'
  -                write(*,*) '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
  -            else if (s% star_mass >= rot_full_off .and. s% star_mass <= rot_full_on) then
  -                frac2 = (s% star_mass - rot_full_off) / &
  -                (rot_full_on - rot_full_off)
  -                frac2 = 0.5d0*(1 - cos(pi*frac2))
  -                s% job% set_near_zams_omega_div_omega_crit_steps = 10
  -                s% job% new_omega_div_omega_crit = s% job% extras_rpar(3) * frac2
  -                write(*,*) '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
  -                write(*,*) 'new omega_div_omega_crit, fraction', s% job% new_omega_div_omega_crit, frac2
  -                write(*,*) '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
  -            else
  -                frac2 = 1.0
  -                s% job% set_near_zams_omega_div_omega_crit_steps = 10
  -                s% job% new_omega_div_omega_crit = s% job% extras_rpar(3) * frac2 !nominally 0.4
  -                write(*,*) '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
  -                write(*,*) 'new omega_div_omega_crit, fraction', s% job% new_omega_div_omega_crit, frac2
  -                write(*,*) '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
  -            end if
  -        else
  -            write(*,*) '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
  -            write(*,*) 'no rotation'
  -            write(*,*) '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
  -        end if
  -        
  -        
  +                      
   ! set VARCONTROL: for massive stars, turn up varcontrol gradually to help them evolve
           vct30 = 1e-4
           vct100 = 3e-3
  
positive.code:     use star_def
      use const_def
      use crlibm_lib
      use rates_def
      use net_def
        
      implicit none
      
      real(dp) :: original_diffusion_dt_limit
      real(dp) :: burn_check = 0.0
      logical :: wd_diffusion = .false.
            
      contains
  
negative.code:      
  ! treat postAGB: suppress late burning by turn off burning post-AGB and also save a model and photo
          envelope_mass_fraction = 1d0 - max(s% he_core_mass, s% c_core_mass, s% o_core_mass)/s% star_mass
          if ((s% initial_mass < 10) .and. (envelope_mass_fraction < 0.1) .and. (s% center_h1 < 1d-4) .and. (s% center_he4 < 1d-4) &
          .and. (s% L_phot > 3.0) .and. (s% Teff > 7000.0)) then
  	    	if (burn_check == 0.0) then !only print the first time
  