computes transaction total