rewrite of ledger