anchor.diff:  					Validity = proplists:get_value(validity, Chars),
   					case RequestType of
   						?initial ->
  -							SA = case update_session(SessionId, SessionIdentification, SessionAttributes, []) of
  -								SessionAttributes ->
  -									SessionAttributes;
  -								NewSessionAttributes ->
  -									NewSessionAttributes
  -							end,
  +							SA = update_session(SessionId, SessionIdentification, SessionAttributes, []),
   							case reserve_units1(?initial, Product, UnitType,
  -									false, RequestAmount, MonitoryAmount, Validity, Buckets) of
  +									false, ReserveAmount, DebitAmount, Validity, Buckets) of
   								out_of_credit ->
   									mnesia:write(Subscriber#subscriber{session_attributes = []}),
   									{out_of_credit, SA};
  
positive.code: 			{error, Reason}
  	end.
  %% @hidden
  reserve_units1(?initial, Product, UnitType, Flag, RequestAmount, _Used, Validity, Buckets) ->
  	case determinate_units(Product, UnitType, Flag, RequestAmount, Validity, Buckets) of
  		{Charged, _NewBuckets} when Charged =< 0 ->
  			out_of_credit;
  		{_Chraged, _NewBuckets} ->
  			{grant, RequestAmount}	
  	end.
  reserve_units1(_, Product, Subscriber, UnitType, Flag, RequestAmount, Used, Validity, Buckets) ->
  	case determinate_units(Product, UnitType, Flag, Used, Validity, Buckets) of
  		{Charged, NewBuckets} when Charged =< 0 andalso Used =/= 0 ->
  			mnesia:write(Subscriber#subscriber{buckets = NewBuckets}),
  			out_of_credit;
  		{_Charged, NewBuckets} ->	
  			mnesia:write(Subscriber#subscriber{buckets = NewBuckets}),
  			case determinate_units(Product, UnitType, Flag, RequestAmount, Validity, Buckets) of
  				{Ch1, _NB1} when Ch1 =< 0 andalso RequestAmount =/=0  ->
  					out_of_credit;
  				_ ->
  					{grant, RequestAmount}
  			end
  	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;
  				seconds -> seconds
  			end,
  			case lists:keyfind(PriceType, #price.type, Prices) of
  				#price{size = Size, amount = Price} ->
  					purchase(Type, Price, Size, Used - Charged, Validity, false, NewBuckets);
  				false ->
  					throw(price_not_found)
  			end;
  
negative.code: 							end;
  						_ ->
  							case reserve_units1(RequestType, Product, Subscriber,
  									UnitType, true, ReserveAmount, DebitAmount, Validity, Buckets) of
  								out_of_credit ->
  									mnesia:write(Subscriber#subscriber{session_attributes = []}),
  									{out_of_credit, SessionAttributes};
  