add sum to output