working transaction-based balance update... needs refactoring