added new function to calculate total transaction history as a sum