anchor.diff:  			Now, T, UnitsBuckets, Acc);
   convert(Price1, Type, Size, ServiceId, ChargingKey, SessionId, Now,
   		[#bucket{remain_amount = R, end_date = Expires,
  -		attributes = Attributes} = B1 | T], UnitsBuckets, Acc)
  +		attributes = #{bucket_type := session}} = B1 | T], UnitsBuckets, Acc)
   		when Price1 > 0, R > 0, ((Expires == undefined) or (Now < Expires)) ->
  +	Attributes = B1#bucket.attributes,
   	#{reservations := Reservations1} = Attributes,
   	F = fun({SessionId1, #{service_id := ServiceId1, charging_key := ChargingKey1}})
   					when ServiceId1 =:= ServiceId,
  
positive.code: 			ServiceId, ChargingKey, SessionId, T, Acc, Charged, Reserved);
  update(Type, Charge, Reserve, Now, ServiceId, ChargingKey, SessionId,
  		[#bucket{units = Type, remain_amount = Remain, end_date = Expires,
  		attributes = Attributes} = B | T], Acc, Charged, Reserved)
  		when ((Expires == undefined) or (Now < Expires)),
  		Remain >= ((Charge - Charged) + (Reserve - Reserved)) ->
  	#{reservations := Reservations} = Attributes,
  	NewCharge = Charge - Charged,
  	NewReserve = Reserve - Reserved,
  
negative.code: 			ServiceId, ChargingKey, SessionId, T, Acc, Charged);
  charge_session1(Type, Charge, Now, ServiceId, ChargingKey, SessionId,
  		[#bucket{units = Type, remain_amount = R, end_date = Expires,
  		attributes = #{bucket_type := session}} = B | T], Acc, Charged)
  		when Charge > 0, R >= Charge,
  		((Expires == undefined) or (Now < Expires)) ->
  	Attributes = B#bucket.attributes,
  	#{reservations := Reservations} = Attributes,
  	NewReservations = Reservations#{SessionId => #{ts => Now, debit => Charge,
  			reserve => 0, service_id => ServiceId, charging_key => ChargingKey}},
  