added the ability to balance based on transaction type