speed up kl series calculation