core functions
simulated data test, without parallelization
real data test, without parallelization