#125 faster calculation of balance