anchor.diff:        erlang:raise(Class,Reason,StackTrace)
     end.
   
  -next_state_int(State,Result,Call) ->
  -  case Call of
  -    {_, ?MODULE, initialize, _, _} ->
  -      State#state{initialized=true};
  -    {_, ?MODULE, follow_link, [Link,_], _} ->
  -      case Result of
  -	{ok,{{_,_Code,_},_Headers,_Body}} ->
  -	  LinksToAdd =
  -	    case response_has_body(Result) of
  -	      true ->
  -		JSONbody = mochijson2:decode(http_body(Result)),
  -		jsg_links:extract_dynamic_links
  -		  (Link,JSONbody,jsg_links:intern_object(JSONbody));
  -	      _ ->
  -		[]
  -	    end,
  -	  State#state
  -	    {
  -	    dynamic_links=
  -	      lists:foldl
  -		(fun (DLink,DLs) ->
  -		     jsl_dynamic_links:add_link(DLink,DLs)
  -		 end, State#state.dynamic_links, LinksToAdd)
  -	   };
  -	_Other ->
  -	  State
  -      end;
  -    _ -> ?LOG("Call was~n~p~n",[Call]), State
  +next_state_int(State,Result,[Link,_]) ->
  +  case Result of
  +    {ok,{{_,_Code,_},_Headers,_Body}} ->
  +      LinksToAdd =
  +	case response_has_body(Result) of
  +	  true ->
  +	    JSONbody = mochijson2:decode(http_body(Result)),
  +	    jsg_links:extract_dynamic_links
  +	      (Link,JSONbody,jsg_links:intern_object(JSONbody));
  +	  _ ->
  +	    []
  +	end,
  +      State#state
  +	{
  +	dynamic_links=
  +	  lists:foldl
  +	    (fun (DLink,DLs) ->
  +		 jsl_dynamic_links:add_link(DLink,DLs)
  +	     end, State#state.dynamic_links, LinksToAdd)
  +       };
  +    _Other ->
  +      State
     end.
   
   make_call(ExternalFunction,InternalFunction,Args) ->
  
positive.code:      dynamic_links=jsl_dynamic_links:initialize(20),
       private_state=PrivateState}.
  
  command(State) ->
    try make_call(command,fun command_int/1,[State])
    catch Class:Reason ->
        io:format
  	("~n*** Error: command/1 raises exception ~p~n",
  	 [Reason]),
        StackTrace = erlang:get_stacktrace(),
        erlang:raise(Class,Reason,StackTrace)
    end.
  
  %% add metadata -- not sure it is necessary...
  
  command_int(State) ->
    if
      State#state.initialized ->
        case jsl_dynamic_links:is_empty(State#state.dynamic_links) of
  	true ->
  	  ?LET(FinalLink,
  	       eqc_gen:oneof(State#state.static_links),
  	       gen_call(FinalLink));
  	
  	false ->
  	  ?LET
  	     (FinalLink,
  	      eqc_gen:
  		frequency
  		  ([{7,
  		     ?LET
  			(Title,
  			 eqc_gen:oneof
  			   (jsl_dynamic_links:titles
  			      (State#state.dynamic_links)),
  			 eqc_gen:oneof
  			   (jsl_dynamic_links:links
  			      (Title,State#state.dynamic_links)))},
  		    {1,
  		     eqc_gen:oneof(State#state.static_links)}]),
  	      gen_call(FinalLink))
        end;
      
      true -> {call, ?MODULE, initialize, []}
    end.
  
  gen_call(Link) ->
    ?LET(Parms,
         gen_http_request(Link),
         {call, ?MODULE, follow_link, [Link,Parms]}).
  
  compose_alternatives(State,Alternatives) ->
    make_call
      (compose_alternatives,fun compose_alternatives_int/2,[State,Alternatives]).
  
  compose_alternatives_int(_State,Alternatives) ->
    eqc_gen:oneof(Alternatives).
  
  initialize() ->
    %%jsg_store:open_clean_db(),
    jsg_utils:clear_schema_cache(),
    true = ets:match_delete(jsg_store,{{object,'_'},'_'}),
  
negative.code: link_permitted_int(_State,_Link) ->
    true.
  
  gen_call(Link) ->
    ?LET(Parms,
         gen_http_request(Link),
         [Link,Parms]).
  
  link_post(State,Args,Result) ->
    try make_call(postcondition,fun postcondition_int/3,[State,Args,Result])
    catch Class:Reason ->
        io:format
  	("Warning: postcondition/3 raises exception ~p~n",
  