anchor.diff:  		Validity :: integer(),
   		Final :: boolean(),
   		Buckets :: [#bucket{}],
  -		Result :: {RemainCharge, Charged, Buckets},
  -		RemainCharge :: integer(),
  +		Result :: {RemainingCharge, Charged, Buckets},
  +		RemainingCharge :: integer(),
   		Charged :: integer().
  +%% @doc Manage usage pricing and debit monetary amount buckets.
  +%%
  +%% 	Subscribers are charged at a monetary rate of `Price' cents
  +%% 	per `Unit' of `Used' service.  The total number of units
  +%% 	required and total monetary amount is calculated and 
  +%% 	debited from available cents buckets as in {@link charge/4}.
  +%%
  +%% 	If `Final' is `false' a new `Type' bucket with the total
  +%% 	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.
  +%%
  +%% @private
   purchase(Type, Price, Size, Used, Validity, Final, Buckets) ->
   	UnitsNeeded = case (Used rem Size) of
   		0 ->
  
positive.code: %%----------------------------------------------------------------------
  %%  internal functions
  %%----------------------------------------------------------------------
  -spec charge(Type, Charge, Final, Buckets) -> Result
  	when
  		Type :: octets | seconds | cents,
  		Charge :: integer(),
  		Final :: boolean(),
  		Buckets :: [#bucket{}],
  		Result :: {RemainCharge, Charged, Buckets},
  		RemainCharge :: integer(),
  		Charged :: integer().
  charge(Type, Charge, Final, Buckets) ->
  	Now = erlang:system_time(?MILLISECOND),
  	F = fun(#bucket{termination_date = T1},
  
negative.code: 	NewBuckets = [B#bucket{remain_amount = R - Charge} | T],
  	{0, Charged + Charge, NewBuckets ++ Acc};
  charge(cents, Charge, _Now, false, [#bucket{bucket_type = cents,
  		remain_amount = R} = B | T], Acc, Charged) when R > Charge ->
  	NewBuckets = [B#bucket{remain_amount = R - Charge} | T],
  	{0, Charged + Charge, NewBuckets ++ Acc};
  charge(Type, Charge, _Now, false, [#bucket{bucket_type = Type,
  		remain_amount = R} | _] = B, Acc, Charged) when R > Charge ->
  