anchor.diff:            end if
   
   C         Interpolating for the value of Z, z solar 10
  -          t = tsub + ((tsol - tsub) / (0.01 - 0.001)) 
  -     &               * (metallicity - 0.001)
  +          main_sequence_lifetime = tsub + ((tsol - tsub) 
  +     &                                     / (0.01 - 0.001)) 
  +     &                                    * (metallicity - 0.001)
         end subroutine
         
   
  
positive.code:                   end if
  C                 Calculating the lifetime in the main sequence
  C                 TODO: resolve the problem with halo stars
                    call tsp(m(i), 
       &                     metallicityOfWD(i), 
       &                     main_sequence_lifetime(i))
                    coolingTime(i) = max_age - starBirthTime(i) 
  
negative.code:       end subroutine
  
  
        subroutine get_main_sequence_lifetime(stellar_mass, 
       &                                      metallicity,
       &                                      main_sequence_lifetime)
  C         Calculates lifetime in the main sequence for a given 
  C         metallicity Z € [0.01, 0.001] for standart helium content 
  C         according to model by Leandro & Renedo et al.(2010)
  C         Data in solar masses and Gyr
            implicit none
  
            real :: stellar_mass,
       &            metallicity,
       &            main_sequence_lifetime,
       &            mms(10),
       &            tms(10),
       &            mms2(7),
  