add balance computation