Used += instead of sum = s + sum