anchor.diff:          Result -> Result
   	end.
   
  -delete_table(Table) when is_atom(Table) ->
  +drop_table(Table) when is_atom(Table) ->
       mnesia:delete_table(Table).
   
  -insert_into_table(TableName, Row) when is_atom(TableName), is_tuple(Row) ->
  +insert(TableName, Row) when is_atom(TableName), is_tuple(Row) ->
       Row1 = case element(1, Row) of
           TableName ->
               [_|R] = tuple_to_list(Row),
               R;
           _ -> tuple_to_list(Row)
       end,
  -    insert_into_table(TableName, Row1);
  -insert_into_table(TableName, Row) when is_atom(TableName), is_list(Row) ->
  +    insert(TableName, Row1);
  +insert(TableName, Row) when is_atom(TableName), is_list(Row) ->
       RowLen = length(Row),
       TableRowLen = length(mnesia:table_info(TableName, attributes)),
       if TableRowLen =:= RowLen ->
  
positive.code: process_cmd({write, TableName, Row},                    Sock) -> send_resp(write(TableName, Row), Sock);
  process_cmd({delete, TableName, Key},                   Sock) -> send_resp(delete(TableName, Key), Sock);
  process_cmd({add_attribute, A, Opts},                   Sock) -> send_resp(add_attribute(A, Opts), Sock);
  process_cmd({delete_table, TableName},                  Sock) -> send_resp(delete_table(TableName), Sock);
  process_cmd({update_opts, Tuple, Opts},                 Sock) -> send_resp(update_opts(Tuple, Opts), Sock);
  process_cmd({read_all_rows, TableName},                 Sock) -> send_resp(read_all_rows(TableName), Sock);
  process_cmd({build_table, TableName, Columns},          Sock) -> send_resp(build_table(TableName, Columns), Sock);
  process_cmd({select_rows, TableName, MatchSpec},        Sock) -> send_resp(select_rows(TableName, MatchSpec), Sock);
  process_cmd({insert_into_table, TableName, Row},        Sock) -> send_resp(insert_into_table(TableName, Row), Sock);
  process_cmd({build_table, TableName, Columns, Opts},    Sock) -> send_resp(build_table(TableName, Columns, Opts), Sock).
  
  send_resp(Resp, Sock) ->
      RespBin = term_to_binary(Resp),
  
negative.code: 
  update_opts({K,_} = T, Opts) when is_atom(K) -> lists:keystore(K, 1, Opts, T).
  
  
  
  create_cluster_table(TableName,Columns,Opts) ->
      DiscNodes = mnesia:table_info(schema, disc_copies),
      RamNodes = mnesia:table_info(schema, ram_copies),
      create_table(TableName,Columns,[{ram_copies, RamNodes}, {disc_copies, DiscNodes}|Opts]).
  
  create_table(TableName,Columns,Opts) ->
      Cols = [list_to_atom(lists:flatten(io_lib:format("~p", [X]))) || X <- Columns],
      CompleteOpts = add_attribute(Cols, Opts),
      create_table(TableName, CompleteOpts).
  