anchor.diff:        end do
   45    continue
   
  -      if(check3.eq.0) write(1007,*) 'ERROR',lumi,mass
  -
  -      return
  -      end
  +      if (check3 == 0) then
  +          write(1007, *) 'ERROR', lumi, mass
  +      end if
  +      end subroutine
   
   
   C     TODO: find out the meaning of arguments
  
positive.code:      &         luminosity(numberOfMassesWithColors,2),c_2)
            call extrap1(mass,c_1,c_2,mtrk(numberOfMassesWithColors-1),
       &         mtrk(numberOfMassesWithColors),c3)
            if(c3.lt.0.0) c3=0.0
            call extrap1(lumi,color_R(numberOfMassesWithColors-1,1),
       &         color_R(numberOfMassesWithColors-1,2),
       &         luminosity(numberOfMassesWithColors-1,1),
  
negative.code:             call extrap1(lumi,color_I(k+1,ns2-1),color_I(k+1,ns2),
       &           luminosity(k+1,ns2-1),luminosity(k+1,ns2),c_2)
              call extrap1(mass,c_1,c_2,mtrk(k),mtrk(k+1),c5)      
              check3 = 1
              GOTO 45
  C         Luminosity between known values
            else
              do i = 1, ns1 - 1
                if (lumi >= luminosity(k, i + 1) 
       &            .and. lumi <= luminosity(k, i)) 
       &        then
                  i1 = i
                  check1 = 1
                  GOTO 25
                end if
              end do      
  25          continue      
              do i = 1, ns2 - 1
                if (lumi >= luminosity(k + 1, i + 1)
       &            .and. lumi <= luminosity(k + 1, i)) then
                  i2 = i
                  check2 = 1
                  GOTO 30
                end if
              end do
  30          continue
              if (check1 == 1 .and. check2 == 1) then
                check3 = 1
                a1 = lumi - luminosity(k, i1)
                a2 = lumi - luminosity(k + 1, i2)
                b1 = luminosity(k,i1+1)-luminosity(k,i1)
                b2 = luminosity(k+1,i2+1)-luminosity(k+1,i2)
                c_1 = color_U(k,i1)+(color_U(k,i1+1)-color_U(k,i1))*a1/b1
                c_2 = color_U(k+1,i2)+(color_U(k+1,i2+1)-color_U(k+1,i2))*
       &            a2/b2
                call extrap1(mass,c_1,c_2,mtrk(k),mtrk(k+1),c1)
                c_1 = color_B(k,i1)+(color_B(k,i1+1)-color_B(k,i1))*a1/b1
                c_2 = color_B(k+1,i2)+(color_B(k+1,i2+1)-color_B(k+1,i2))*
       &            a2/b2
               call extrap1(mass,c_1,c_2,mtrk(k),mtrk(k+1),c2)
                c_1 = color_V(k,i1)+(color_V(k,i1+1)-color_V(k,i1))*a1/b1
                c_2 = color_V(k+1,i2)+(color_V(k+1,i2+1)-color_V(k+1,i2))*
       &            a2/b2
                call extrap1(mass,c_1,c_2,mtrk(k),mtrk(k+1),c3)
                c_1 = color_R(k,i1)+(color_R(k,i1+1)-color_R(k,i1))*a1/b1
                c_2 = color_R(k+1,i2)+(color_R(k+1,i2+1)-color_R(k+1,i2))*
       &            a2/b2
                call extrap1(mass,c_1,c_2,mtrk(k),mtrk(k+1),c4)
                c_1 = color_I(k,i1)+(color_I(k,i1+1)-color_I(k,i1))*a1/b1
                c_2 = color_I(k+1,i2)+(color_I(k+1,i2+1)-color_I(k+1,i2))*
       &            a2/b2
                call extrap1(mass,c_1,c_2,mtrk(k),mtrk(k+1),c5)
                GOTO 45
  