add computed balance
fix bug with computing balance