analytic code