add getsum and getavg