Added method to calculate total spendings. (No, it's not working)