refactor the summing assignments into chained variable
correct readability of spec tests