added binary db search to speed up process of getting ledgers by time range