sum
using sum for series
performance improvement