anchor.diff:  		#price{units = Type, size = Size, amount = Price} = lists:keyfind(usage, #price.type, Prices),
   		{Type, Used} = lists:keyfind(Type, 1, DebitAmount),
   		case charge(Type, Used, true, Buckets) of
  -			{C1, NB1} when C1 < Used ->
  -				{C2, NB2}  = purchase(Type, Price, Size, Used - C1, Validity, true, NB1),
  -				{C2, NB2, (Used - C1)};
  -			{C1, NB1} ->
  -				{C1, NB1, Used}
  +			{R1, C1, NB1} when R1 > 0 ->
  +				{R2, C2, NB2}  = purchase(Type, Price, Size, Used - C1, Validity, true, NB1),
  +				{R2, NB2};
  +			{R1, C1, NB1} ->
  +				{R1, NB1}
   		end
   	of
  -		{Charged, NewBuckets, _UsedRemain}  ->
  +		{RemainCharge, NewBuckets}  when RemainCharge > 0 ->
  +			rate3(Subscriber#subscriber{buckets = NewBuckets},
  +					RemainCharge, Flag, ReserveAmount, SessionIdentification);
  +		{RemainCharge, NewBuckets} ->
   			rate2(Subscriber#subscriber{buckets = NewBuckets},
  -					Prices, Flag, ReserveAmount, SessionIdentification, Charged)
  +					Prices, Flag, ReserveAmount, SessionIdentification, RemainCharge)
   	catch
   		_:_ ->
   			throw(price_not_found)
  
positive.code: 		remain_amount = R}  = B | T], Acc, Charged) when R =< Charge ->
  	charge(Type, Charge - R, Now, false, T, [B | Acc], Charged);
  charge(_Type, 0, _Now, _Final, Buckets, Acc, Charged) ->
  	{Charged, Buckets ++ Acc};
  charge(Type, Charge, Now, Final, [H | T], Acc, Charged) ->
  	charge(Type, Charge, Now, Final, T, [H | Acc], Charged);
  charge(_Type, _Charge, _Now, _Final, [], Acc, Charged) ->
  	{Charged, Acc}.
  
  -spec purchase(Type, Price, Size, Used, Validity, Final, Buckets) -> Result
  	when
  
negative.code: 	end,
  	Charge = UnitsNeeded * Price,
  	case charge(cents, Charge, Final, Buckets) of
  		{RemainCharge, Charged, NewBuckets} when Charged < Charge ->
  			{RemainCharge, Charged, NewBuckets};
  		{RemainCharge, Charged, NewBuckets} when RemainCharge =/= 0 ->
  			Remain = case Final of
  				true ->
  					UnitsNeeded * Size - Used;
  