anchor.diff:  			{UnitReserve, _} = price_units(Ramount, UnitSize, UnitPrice),
   			case convert(PriceReserve, Units, ConvertReserve, SessionId, Buckets2) of
   				{ok, Buckets3} ->
  -erlang:display({?MODULE, ?LINE, Buckets3}),
   					case update_session(Units, NewChargeUnits, UnitReserve,
   							SessionId, Buckets3) of
   						{NewChargeUnits, UnitsReserved, Buckets4}
   								when UnitsReserved >= UnitReserve ->
  -erlang:display({?MODULE, ?LINE, NewChargeUnits, UnitsReserved, Buckets4}),
   							rate7(Service, Buckets4, interim, DebitAmount,
   									{Units, UnitsCharged + NewChargeUnits},
   									ReserveAmount, {Units, UnitsReserved}, State);
  
positive.code: 		{{_, _, _}, {_, _, _}} = Timestamp, Address, Direction, Flag,
  		DebitAmounts, ReserveAmounts, SessionAttributes)
  		when ((Protocol == radius) or (Protocol == diameter)),
  		(is_integer(ChargingKey) or (ChargingKey == undefined)), 
  		(is_list(ServiceNetwork) or (ServiceNetwork == undefined)),
  		is_binary(SubscriberID),
  		(is_list(Address) or (Address == undefined)),
  
negative.code: 		#state{session_id = SessionId} = State) ->
  	case update_session(Units, Damount, Ramount, SessionId, Buckets) of
  		{Damount, UnitsReserved, Buckets2} when UnitsReserved >= Ramount ->
  			rate7(Service, Buckets2, interim, DebitAmount, DebitAmount,
  					ReserveAmount, {Units, UnitsReserved}, State);
  		{Damount, UnitsReserved, Buckets2} when UnitsReserved < Ramount ->
  			NewReserveUnits = Ramount - UnitsReserved,
  			{UnitReserve, PriceReserve} = price_units(NewReserveUnits,
  					UnitSize, UnitPrice),
  			case convert(PriceReserve, Units, UnitReserve, SessionId, Buckets2) of
  				{ok, Buckets3} ->
  					{0, UnitReserve, Buckets4} = update_session(Units, 0,
  							NewReserveUnits, SessionId, Buckets3),
  					rate7(Service, Buckets4, interim,
  							DebitAmount, DebitAmount, ReserveAmount,
  							{Units, UnitsReserved + UnitReserve}, State);
  