implements sum() and average() methods