        (create-transaction-item storage)
        after-item-read))
 
-(defn- update-account-balances
-  [& args]
-
-  (pprint {:update-account-balances args}) 
-
-  )
+(defn search-items
+  "Returns transaction items matching the specified criteria"
+  ([storage-spec criteria]
+   (search-items storage-spec criteria {}))
+  ([storage-spec criteria options]
+   (with-storage [s storage-spec]
+     (map after-item-read (select-transaction-items s criteria options)))))
 
 (defn- recalculate-account-items
   "Accepts a tuple containing an account-id and a base item,

      (:balance t)
      0M)))

(defn search-items
  "Returns transaction items matching the specified criteria"
  [storage-spec criteria]
  (with-storage [s storage-spec]
    (->> criteria
         (select-transaction-items s)
         (map after-item-read))))

(defn find-items-by-ids
  [storage-spec ids date-range]
  (search-items

  [storage base-items]
  (->> base-items
       (group-by :account-id)
       (map #(update-in % [1] first))
       (mapv (partial recalculate-account-items storage))))

(defn- create-transaction-and-adjust-balances
  [storage transaction]
