series calculation and initial update code