Added analytic code