    end
 
    def handle_command({:C, clock, commit_object, entries, ref}, _sender, 
-                      State[tab: tab, staging_tab: staging] = state) do
+                      State[tab: tab, staging_tab: staging, commit_tab: commit_tab] = state) do
      lc {key, entry_clock} inlist entries do
        case ETS.lookup(tab, key) do
          [] -> history = []; value = @nil_value

                   end)
       ETS.insert(tab, {key, {value, [{entry_clock, clock}|history]}})
     end
     ETS.insert(tab, {{:C, clock}, {commit_object, [clock]}})
     {:reply, {:ok, ref, state.partition, :ok}, state}
   end


     :erlang.process_flag(:trap_exit, true)
     tab = ETS.new(__MODULE__, [:ordered_set])
     staging_tab = ETS.new(__MODULE__.Staging, [:ordered_set])
     commit_tab = ETS.new(__MODULE__.Commit, [])
     {:ok, State.new(partition: partition, tab: tab, staging_tab: staging_tab,
                     commit_tab: commit_tab)}
   end

   @spec handle_command(fold_req | command | commit, sender, State.t) ::
