anchor.diff:  	rating3(Amount, Size, seconds, Validity, UsageSecs, Final, Buckets).
   %% @hidden
   rating3(Price, Size, Type, Validity, Used, Final, Buckets) ->
  -	case charge(Type, Used, Final, lists:sort(fun sort_buckets/2, Buckets)) of
  +	case charge(Type, Used, Final, Buckets) of
   		{Charged, NewBuckets} when Charged < Used ->
   			purchase(Type, Price, Size, Used - Charged, Validity, Final, NewBuckets);
   		{Charged, NewBuckets} ->
  
positive.code: 		Charged :: integer().
  charge(Type, Charge, Final, Buckets) ->
  	Now = erlang:system_time(?MILLISECOND),
  	charge(Type, Charge, Now, Final, Buckets, [], 0).
  %% @hidden
  charge(Type, Charge, Now, Final, [#bucket{bucket_type = Type,
  		termination_date = T1} | T], Acc, Charged) when T1 =/= undefined, T1 =< Now->
  
negative.code: 	end.
  %% @hidden
  determinate_units([#product{price = Prices}], Type, Flag, Used, Validity, Buckets) ->
  	case charge(Type, Used, Flag, Buckets) of
  		{Charged, NewBuckets} when Charged < Used ->
  			PriceType = case Type of
  				octets -> usage;
  