refactored code - put in balance update into winner and loser helper function