changes to balance calaculations