oops. fix the sum fn