anchor.diff:  		{Type, Used} = lists:keyfind(Type, 1, DebitAmount),
   		case charge(Type, Used, true, Buckets) of
   			{R1, _C1, NB1} when R1 > 0 ->
  -				{R2, _C2, NB2}  = purchase(Type, Price, Size, R1, Validity, true, NB1),
  -				{R2, NB2};
  -			{R1, _C1, NB1} ->
  -				{R1, NB1}
  +				purchase(Type, Price, Size, R1, Validity, true, NB1);
  +			{R1, C1, NB1} ->
  +				{R1, C1, NB1}
   		end
   	of
  -		{RemainCharge, NewBuckets}  when RemainCharge > 0 ->
  +		{RemainingCharge, _Charged, NewBuckets}  when RemainingCharge > 0 ->
   			rate3(Subscriber#subscriber{buckets = NewBuckets},
  -					RemainCharge, Flag, ReserveAmount, SessionIdentification);
  -		{RemainCharge, NewBuckets} ->
  -			rate2(Subscriber#subscriber{buckets = NewBuckets},
  -					Prices, Validity, Flag, ReserveAmount, SessionIdentification, RemainCharge)
  +					RemainingCharge, Flag, ReserveAmount, SessionIdentification);
  +		{RemainingCharge, _Charged, NewBuckets} ->
  +			rate2(Subscriber#subscriber{buckets = NewBuckets}, Prices,
  +					Validity, Flag, ReserveAmount, SessionIdentification, RemainingCharge)
   	catch
   		_:_ ->
   			throw(price_not_found)
  
positive.code: %% 	number of units required and expiration of `Validity' is
  %% 	added to `Buckets'.
  %%
  %% 	Returns `{RemainingCharge, Charged, Buckets}' where
  %% 	`Charge' is the total amount debited from the buckets,
  %% 	`RemainingCharge' is the left over amount not charged
  %% 	and `NewBuckets' is the updated bucket list.
  %%
  
negative.code: %% 	 `Charge' amount is debited from the buckets. Empty
  %% 	buckets are removed.
  %%
  %% 	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.
  %%
  