anchor.diff:  				{R1, C1, NB1}
   		end
   	of
  -		{RemainingCharge, ReservedAmount, NewBuckets} ->
  +		{0, ReservedAmount, NewBuckets} ->
   			rate3(Subscriber#subscriber{buckets = NewBuckets},
  -					RemainingCharge, Flag, ReservedAmount, SessionIdentification)
  +					0, Flag, ReservedAmount, SessionIdentification);
  +		{RemainingCharge, ReservedAmount, _NewBuckets} ->
  +			rate3(Subscriber, RemainingCharge,
  +				Flag, ReservedAmount, SessionIdentification)
   	catch
   		_:_ ->
   			throw(price_not_found)
   	end.
   %% @hidden
   rate3(#subscriber{session_attributes = SessionList} = Subscriber,
  -		Charged, _Flag, _ReserveAmount, _SessionIdentification)
  -		when Charged > 0 ->
  +		RemainingCharge, _Flag, _ReserveAmount, _SessionIdentification)
  +		when RemainingCharge > 0 ->
   	Entry = Subscriber#subscriber{session_attributes = []},
   	ok = mnesia:write(Entry),
   	{out_of_credit, SessionList};
   rate3(#subscriber{session_attributes = SessionList} = Subscriber,
  -		_Charged, initial, ReserveAmount, SessionIdentification) ->
  +		_RemainingCharge, initial, ReserveAmount, SessionIdentification) ->
   	NewSessionList = update_session(SessionIdentification, SessionList),
   	Entry = Subscriber#subscriber{session_attributes = NewSessionList},
   	ok = mnesia:write(Entry),
   	{grant, Entry, ReserveAmount};
   rate3(#subscriber{session_attributes = SessionList} = Subscriber,
  -		_Charged, final, ReserveAmount, SessionIdentification) ->
  +		_RemainingCharge, final, ReserveAmount, SessionIdentification) ->
   	NewSessionList = remove_session(SessionList, SessionIdentification),
   	Entry = Subscriber#subscriber{session_attributes = NewSessionList},
   	ok = mnesia:write(Entry),
   	{grant, Entry, ReserveAmount};
  -rate3(Subscriber, _Charged, interim, ReserveAmount, _SessionIdentification) ->
  +rate3(Subscriber, _RemainingCharge, interim, ReserveAmount, _SessionIdentification) ->
   	ok = mnesia:write(Subscriber),
   	{grant, Subscriber, ReserveAmount}.
   
  
positive.code: %% 	number of units required and expiration of `Validity' is
  %% 	added to `Buckets'.
  %%
  %% 	Returns `{RemainingCharge, Charged, NewBuckets}' where
  %% 	`Charged' is the total amount debited from the buckets,
  %% 	`RemainingCharge' is the left over amount not charged
  %% 	and `NewBuckets' is the updated bucket list.
  %%
  %% @private
  purchase(Type, Price, Size, Used, Validity, Final, Buckets) ->
  
negative.code: 		Validity :: integer(),
  		Final :: boolean(),
  		Buckets :: [#bucket{}],
  		Result :: {RemainingUnits, UnitsCharged, NewBuckets},
  		RemainingUnits :: integer(),
  		UnitsCharged :: integer(),
  		NewBuckets :: [#bucket{}].
  %% @doc Manage usage pricing and debit monetary amount buckets.
  %%
  