Changed result output to accumulate results