overhauling ledger calc method
further refactoring