analytic code update