anchor.diff:  			ok = send_notifications(DeletedBuckets),
   			ok = notify_accumulated_balance(AccBalance),
   			{ok, Sub, Granted, Rated1};
  -		{atomic, {out_of_credit, RedirectServerAddress, SL, Rated, DeletedBuckets, AccBalance}} ->
  +		{atomic, {{out_of_credit, SL, Rated,
  +				DeletedBuckets, AccBalance}, RedirectServerAddress}} ->
   			ok = send_notifications(DeletedBuckets),
   			ok = notify_accumulated_balance(AccBalance),
   			{out_of_credit, RedirectServerAddress, SL, Rated};
  -		{atomic, {grant, Sub, {_Units, Amount} = Granted, DeletedBuckets,
  -				AccBalance}} when is_integer(Amount) ->
  +		{atomic, {{grant, Sub, {_Units, Amount} = Granted, DeletedBuckets,
  +				AccBalance}, _}} when is_integer(Amount) ->
   			ok = send_notifications(DeletedBuckets),
   			ok = notify_accumulated_balance(AccBalance),
   			{ok, Sub, Granted};
  -		{atomic, {out_of_credit, RedirectServerAddress, SL, DeletedBuckets, AccBalance}} ->
  +		{atomic, {{out_of_credit, SL,
  +				DeletedBuckets, AccBalance}, RedirectServerAddress}} ->
   			ok = send_notifications(DeletedBuckets),
   			ok = notify_accumulated_balance(AccBalance),
   			{out_of_credit, RedirectServerAddress, SL};
  -		{atomic, {disabled, SL, DeletedBuckets, AccBalance}} ->
  +		{atomic, {{disabled, SL, DeletedBuckets, AccBalance}, _}} ->
   			ok = send_notifications(DeletedBuckets),
   			ok = notify_accumulated_balance(AccBalance),
   			{disabled, SL};
  
positive.code: 			accumulated_balance(Buckets, Product#product.id)};
  charge3(#service{session_attributes = SessionList} = Service1, Product, Buckets, event,
  		{Units, _Charge}, {Units, _Charged}, {Units, 0}, {Units, 0},
  		#state{rated = Rated, buckets = OldBuckets,
  		redirect_server = RedirectServerAddress}) ->
  	{NewBRefs, DeletedBuckets}
  			= update_buckets(Product#product.balance, OldBuckets, Buckets),
  	ok = mnesia:write(Product#product{balance = NewBRefs}),
  	Service2 = Service1#service{session_attributes = []},
  	ok = mnesia:write(Service2),
  	{out_of_credit, RedirectServerAddress, SessionList, Rated, DeletedBuckets,
  			accumulated_balance(Buckets, Product#product.id)}.
  
  -spec authorize(Protocol, ServiceType, SubscriberId, Password,
  
negative.code: 									case lists:all(F2, Buckets) of
  										true ->
  											State = #state{buckets = Buckets,
  													service_id = ServiceId,
  													charging_key = ChargingKey,
  													service_network = ServiceNetwork,
  													session_id = get_session_id(SessionAttributes)},
  											{rate1(Protocol, Service, Product, Buckets,
  													Timestamp, Address, Direction, Offer,
  													Flag, DebitAmounts, ReserveAmounts, ServiceType, State), RedirectServerAddress};
  										false ->
  											{out_of_credit, RedirectServerAddress, SessionList, [], []}
  									end;
  