adding buffer stuff, and catching undefined ledger condition