new get_balance function