implemments CalculateSum