implements sum