updating and testing ledger