anchor.diff:  perform_patch(Id, ReqBody) ->
   	{ok, Address} = inet:parse_address(Id),
   	case ocs:find_client(Address) of
  -		{ok, _SecretBin} ->
  +		{ok, CurrDiscPort, CurrProtocol, CurrSecret} ->
   			try
   				{struct, Object} = mochijson:decode(ReqBody),
  -				{_, NewPassword} = lists:keyfind("password", 1, Object),
  -				ok = ocs:update_client(Address, NewPassword),
  -				RespObj =[{id, Id}, {href, "/ocs/v1/client/" ++ Id},
  -					{password, NewPassword}],
  -				JsonObj  = {struct, RespObj},
  -				RespBody = mochijson:encode(JsonObj),
  -				{body, RespBody}
  +				case Object of
  +					[{"secret", NewPassword}] ->
  +						Protocol_Atom = string:to_upper(atom_to_list(CurrProtocol)),
  +						perfrom_patch1(Id, CurrDiscPort, Protocol_Atom, NewPassword);
  +					[{"disconnectPort", NewDiscPort},{"protocol", NewProtocol}] ->
  +						NewProtocolAtom = string:to_upper(atom_to_list(NewProtocol)),
  +						perform_patch2(Id, NewDiscPort, NewProtocolAtom, CurrSecret)
  +				end
   			catch
   				throw : _ ->
   					{error, 400}
  
positive.code: 	try 
  		{struct, Object} = mochijson:decode(RequestBody),
  		{_, Id} = lists:keyfind("id", 1, Object),
  		{_, Secret} = lists:keyfind("secret", 1, Object),
  		perform_post1(Id, Secret)
  	catch
  		_Error ->
  			{error, 400}
  	end.
  %% @hidden
  perform_post1(Id, Secret) ->
  	try
  	case catch ocs:add_client(Id, Secret) of
  		ok ->
  			Location = "/ocs/v1/client/" ++ Id,
  			RespObj = [{id, Id}, {href, Location}, {secret, Secret}],
  			JsonObj  = {struct, RespObj},
  			Body = mochijson:encode(JsonObj),
  			{Location, Body};
  
negative.code: 	end.
  %% @hidden
  perform_get_all1(Clients) ->
  	F = fun(#radius_client{address= Address, disconnect_port = DiscPort,
  			protocol = Protocol, secret = Secret}, Acc) ->
  		Id = inet:ntoa(Address),
  		RespObj = [{struct, [{id, Id}, {href, "/ocs/v1/client/" ++ Id},
  			{"disconnectPort", DiscPort},
  			{protocol, string:to_upper(atom_to_list(Protocol))}, {secret, Secret}]}],
  		RespObj ++ Acc
  	end,
  	JsonObj = lists:foldl(F, [], Clients),
  