anchor.diff:  		read( args(k), '(i5)' ) n_each_observ(k) ! store
   	end do
   
  -	read(15, '(a)') line ! total number of measurements
  +	read(15, '(a)') line
   	line = trim(line(index(line, "#")+1:))
  -	read(line, *) n 
  +	read(line, *) n  ! total number of measurements
   	if (n /= sum(n_each_observ)) stop 'Error parsing input file'
   
  -	
  +
  +    !! some parameters and allocations depend on the ones set on the namelist / input file
  +    nplanets = mod(nest_context,100) / 10 ! this is good for now
  +    sdim = 5*nplanets + nobserv + nextra
  +    allocate(spriorran(sdim, 2))
  +    allocate(nest_pWrap(sdim))
  +    nest_nPar=sdim
  +
  +
   	!initialize data size dependant variables
   	call likelihood_init(n)
   	do i = 1, n
  
positive.code:     end if
  
      ! extra parameters are systematic velocities for each observatory 
      ! plus, if present, the jitter
      nextra = nextra + nobserv
  
  
      if (using_gp) then
      	k3 = DiagonalKernel((/1.d0/))
      	kernel_to_pass => k3
      	!k5 = ExpSquaredKernel((/ 1.d0, 1.d0 /))
      	!kernel_to_pass => k5
      	gp1 = GP(k3%evaluate_kernel(times, times), kernel_to_pass)
      	gp1%mean_fun => mean_fun_keplerian
  		gp_n_planets = 1
  		gp_n_planet_pars = 6
  
negative.code: 	end do
  
  	if (using_jitter) then
      ! parameter array organization in this case:
      ! P1, K1, ecc1, omega1, t01, [P2, K2, ecc2, omega2, t02], jitter, vsys_obs1, [vsys_obs2]
  		i = sdim-nextra+1 ! index of jitter parameter
  		spriorran(i,1)= 1d0
  		spriorran(i,2)= kmax
  