anchor.diff:  				{PriceCharge, Buckets3} ->
   					TotalUnits = UnitsCharged + UnitCharge,
   					rate6(Service, Buckets3, final, DebitAmount,
  -							TotalUnits, 0, 0, State#{rated => Rated3});
  +							TotalUnits, 0, 0, State#state{rated = Rated3});
   				{PriceCharged, Buckets3} ->
   					TotalUnits = UnitsCharged + (PriceCharged div UnitPrice),
   					%% @todo generate unique bucket id
   					Buckets4 = [#bucket{remain_amount = PriceCharged - PriceCharge,
   							units = cents} | Buckets3],
   					rate6(Service, Buckets4, final, DebitAmount,
  -							TotalUnits, 0, 0, State#{rated => Rated3})
  +							TotalUnits, 0, 0, State#state{rated = Rated3})
   			end
   	end.
   %% @hidden
   rate6(#service{session_attributes = SessionList} =
   		Service1, Buckets, final, Charge, Charged, 0, 0,
  -		#{session_id := SessionId, rated := Rated, product := P,
  -		session_id := SessionId, buckets := OldBuckets})
  -		when Charged >= Charge ->
  +		#state{rated = Rated, product = P, session_id = SessionId,
  +		buckets = OldBuckets}) when Charged >= Charge ->
   	NewBuckets1 = refund(SessionId, Buckets),
   	{Seconds, Octets, Cents, Msgs, NewBuckets2} = get_debits(SessionId, NewBuckets1),
   	NewBRefs = update_buckets(P#product.balance, OldBuckets, NewBuckets2),
  
positive.code: rate5(#service{enabled = false} = Service, Buckets1,
  		#price{units = Units, size = UnitSize, amount = UnitPrice},
  		interim, DebitAmount, _ReserveAmount,
  		#{session_id := SessionId} = State) ->
  	case update_session(Units, DebitAmount, 0, SessionId, Buckets1) of
  		{DebitAmount, 0, Buckets2} ->
  			rate6(Service, Buckets2, interim,
  
negative.code: %% @hidden
  rate5(Service, Buckets1,
  		#price{units = Units, size = UnitSize, amount = UnitPrice},
  		initial, 0, ReserveAmount, #state{session_id = SessionId} = State) ->
  	case reserve_session(Units, ReserveAmount, SessionId, Buckets1) of
  		{ReserveAmount, Buckets2} ->
  			rate6(Service, Buckets2, initial,
  