sent the expense records to the result view and used a dictionary to calculate the total amount for each person