anchor.diff:  			T, Charged, [H | Acc]);
   charge_session(Type, Charge, Now,
   		ServiceId, ChargingKey, SessionId, [], Charged, Acc) ->
  -	charge1(Type, Charge, Now, ServiceId, ChargingKey, SessionId,
  +	charge_session1(Type, Charge, Now, ServiceId, ChargingKey, SessionId,
   			lists:reverse(Acc), [], Charged).
   
   %% @hidden
  -charge1(Type, Charge, Now, ServiceId, ChargingKey, SessionId,
  +charge_session1(Type, Charge, Now, ServiceId, ChargingKey, SessionId,
   		[#bucket{end_date = Expires, reservations = [],
   		remain_amount = R} | T], Acc, Charged)
   		when R >= 0, Expires /= undefined, Expires =< Now ->
  -	charge1(Type, Charge, Now,
  +	charge_session1(Type, Charge, Now,
   			ServiceId, ChargingKey, SessionId, T, Acc, Charged);
  -charge1(Type, Charge, Now, ServiceId, ChargingKey, SessionId,
  +charge_session1(Type, Charge, Now, ServiceId, ChargingKey, SessionId,
   		[#bucket{units = Type, remain_amount = R, end_date = Expires,
   		reservations = Reservations} = B | T], Acc, Charged)
   		when Charge > 0, R >= Charge,
  
positive.code: 					{service_network, ServiceNetwork}, {result, Other}]),
  			mnesia:abort(table_lookup_failed)
  	end;
  rate4(Protocol, Service, ServiceId, Product, Buckets, Price,
  		Flag, DebitAmounts, ReserveAmounts, SessionId,
  		_RoamingTable, Rated, ChargingKey, _ServiceNetwork) ->
  	charge1(Protocol, Service, ServiceId, Product, Buckets, Price,
  			Flag, DebitAmounts, ReserveAmounts, SessionId, Rated, ChargingKey).
  
  -spec charge(Protocol, SubscriberID, ServiceId, Price, ChargingKey, Flag, DebitAmounts,
  		ReserveAmounts, SessionAttributes) -> Result
  	when
  		Protocol :: radius | diameter,
  		SubscriberID :: binary(),
  		ServiceId :: string(),
  		ChargingKey :: integer() | undefined,
  		Price :: #price{},
  		Flag :: initial | interim | final | event,
  		DebitAmounts :: list(),
  		ReserveAmounts :: list() | undefined,
  
negative.code: 		RedirectServerAddress :: string() | undefined,
  		Reason :: term().
  %% @doc Handle balance management for used and reserved unit amounts.
  charge(Protocol, SubscriberID, ServiceId,
  		UnitSize, Units, Currency, UnitPrice, PriceChars,
  		ChargingKey, Flag, DebitAmounts,
  		ReserveAmounts, SessionAttributes)
  		when ((Protocol == radius) or (Protocol == diameter)),
  		is_binary(SubscriberID), is_list(ServiceId),
  		(is_integer(ChargingKey) or (ChargingKey == undefined)),
  		(is_integer(UnitSize) or (UnitSize == undefined)),
  		(is_integer(UnitPrice) or (UnitPrice == undefined)),
  		(is_integer(Units) or (Units == undefined)),
  		is_list(Currency),
  		((Flag == initial) or (Flag == interim) or (Flag == final) or (Flag == event)),
  		is_list(DebitAmounts),
  		(is_list(ReserveAmounts) or (ReserveAmounts == undefined)),
  