anchor.diff:  		ReserveAmount :: [{Type, Amount}],
   		Type :: octets | seconds,
   		Amount :: integer(),
  -		Result :: {ok, Subscriber, GrantAmount} | {out_of_credit, SessionList} | {error, Reason},
  +		Result :: {ok, Subscriber, GrantedAmount} | {out_of_credit, SessionList} | {error, Reason},
   		Subscriber :: #subscriber{},
  -		GrantAmount :: integer(),
  +		GrantedAmount :: integer(),
   		SessionList :: [tuple()],
   		Reason :: term().
   %% @equiv rate(SubscriberID, Flag, DebitAmount, ReserveAmount, [])
  
positive.code: 		SessionIdentification :: [tuple()],
  		Type :: octets | seconds,
  		Amount :: integer(),
  		Result :: {ok, Subscriber, GrantAmount} | {out_of_credit, SessionList} | {error, Reason},
  		Subscriber :: #subscriber{},
  		GrantAmount :: integer(),
  		SessionList :: [tuple()],
  		Reason :: term().
  %% @doc
  rate(SubscriberID, Flag, DebitAmount, ReserveAmount, SessionIdentification) when is_list(SubscriberID)->
  	rate(list_to_binary(SubscriberID), Flag, DebitAmount, ReserveAmount, SessionIdentification);
  rate(SubscriberID, Flag, DebitAmount, ReserveAmount, SessionIdentification)
  
negative.code: 			end
  	end,
  	case mnesia:transaction(F) of
  		{atomic, {grant, Sub, GrantedAmount}} ->
  			{ok, Sub, GrantedAmount};
  		{atomic, {out_of_credit, SL}} ->
  			{out_of_credit, SL};
  		{aborted, {throw, Reason}} ->
  