      end
    end
 
+   @compile {:inline, [history_entry: 2]}
+   defp history_entry(clock, clock), do: clock
+   defp history_entry(entry_clock, clock) do
+     {entry_clock, clock}
+   end
+
  end
                       v
                     end
                   end)
       if page_ctr <= @object_page_size do
         ETS.insert(tab, {{key, page}, {page_ctr + 1, {value, [{entry_clock, clock}|history]}}})
       else
         # allocate a new page
         ETS.insert(tab, [{key, page + 1},
                          {{key, page + 1}, {1, {value, [{{entry_clock, clock}}]}}}])
       end
     end
     ETS.insert(commit_tab, {{:C, clock}, {MsgPack.pack(commit_object), [clock]}})

     end
     case ETS.lookup(tab, {key, page}) do
       [{_, {_, {value, [{clock, txn_clock}|_history]}}}] -> {value, clock, txn_clock}
       [{_, {_, {value, [clock|_history]}}}] -> {value, clock, clock}
       _ -> {@nil_value, "", ""}
     end
   end
