anchor.diff:      end.	
   
   %% @doc @todo
  -add(_BindDN,_DN,_Attributes) ->
  -    success.
  +add(_BindDN, DN, Attrs) ->
  +    case emongo:find_one(eds, ?COLL, [{"_rdn", rdn(DN)}]) of
  +	[_Entry] -> entryAlreadyExists;
  +	[] ->
  +	    Entry = lists:map(fun(A) -> attribute_to_item(A) end, Attrs),
  +	    AddDN = object_insert(<<"dn">>, DN, Entry),
  +	    NewEntry = object_insert(<<"_rdn">>, rdn(DN), AddDN),	    
  +	    Response = emongo:insert_sync(eds, ?COLL, NewEntry),
  +	    parse_response(Response)
  +    end.
   
   %% @doc @todo
   parse_response([Response]) ->
  
positive.code: %% @doc @todo
  attribute_to_item({'PartialAttribute', Name, [Value]}) when is_list(Name),
  							    is_list(Value) ->
      {Name, Value};
  attribute_to_item({'PartialAttribute', Name, Value}) when is_list(Name),
  							  is_list(Value) ->
      {Name, {array, Value}}.
  
  handle_cast({{bindRequest, Options}, MessageID,_BindDN, From}, State) ->
      {'BindRequest',_, BindDN, Creds} = Options,
  
negative.code: search_reply(_From, SearchResult,_MessageID) when is_atom(SearchResult) ->
      SearchResult;
  search_reply(From, [Item|Result], MessageID) ->
      Attrs = lists:flatten(lists:map(fun(I) -> item_to_attribute(I) end, Item)),
      {value, {_, "dn", [DN]}, PartialAttrs} = lists:keytake("dn", 2, Attrs),
      Entry = {'SearchResultEntry', DN, PartialAttrs},
      ldap_fsm:reply(From, {{searchResEntry, Entry}, MessageID}),
  