anchor.diff:  	    code_changer(Cs, Codes, T, Pids, Ps)
       end.
   
  -%% generate code that receives a token, code switches to new code
  -%% then matches this token against a literal code token
  -%% should be identical
  -%% (smoke test for parallel code loading
  -generate_codes([]) -> [];
  -generate_codes([T|Ts]) ->
  -    [{T, generate(?model, [], [
  -	    format("check(T) -> receive {_Pid, change, T1} -> "
  -		" ~w:check(T1)\n"
  -		" after 0 -> T = f(), check(T) end.\n", [?model]),
  +
  +
  +many_load_distributed_only_once(_Conf) ->
  +    Ts = [<<"first version">>, <<"second version">>],
  +
  +    [{Token1,Code1},{Token2, Code2}] = [{T, generate(?model, [], [
  +	    "check({<<\"second version\">> = V, Pid}) -> V = f(), Pid ! {self(), completed, V}, ok;\n" ++
  +	    format("check(T) -> receive {Pid, change, T1, B} -> "
  +		" Res = erlang:load_module(~w, B), Pid ! {self(), change, Res},\n"
  +		" ~w:check({T1, Pid})\n"
  +		" after 0 -> T = f(), check(T) end.\n", [?model, ?model]),
   	    format("f() -> ~w.~n", [T])
  -	])} | generate_codes(Ts)].
  +	])} || T <- Ts],
   
  +
  +    {module, ?model} = erlang:load_module(?model, Code1),
  +    Pids = setup_checkers(Token1,?number_of_processes),
  +
  +    receive after 1000 -> ok end, % give 'em some time to spin up
  +    [Pid ! {self(), change, Token2, Code2} || Pid <- Pids],
  +    Loads = [receive {Pid, change, Res} -> Res end || Pid <- Pids],
  +    [receive {Pid, completed, Token2} -> ok end || Pid <- Pids],
  +
  +    ok = ensure_only_one_load(Loads, 0).
  +
  +ensure_only_one_load([], 1) -> ok;
  +ensure_only_one_load([], _) -> too_many_loads;
  +ensure_only_one_load([{module, ?model}|Loads], N) ->
  +    ensure_only_one_load(Loads, N + 1);
  +ensure_only_one_load([{error, not_purged}|Loads], N) ->
  +    ensure_only_one_load(Loads, N).
  +% no other return values are allowed from load_module
   
   
   %% aux
  
positive.code:     ]).
  
  -export([
  	parallel_load_check_purge_repeat/1
      ]).
  
  -define(model,       my_model).
  -define(interval,    1500).
  -define(number_of_processes, 160).
  -define(passes, 4).
  
negative.code: suite() -> [{ct_hooks,[ts_install_cth]}].
  
  all() ->
      [
  	multiple_load_check_purge_repeat,
  	many_load_distributed_only_once
      ].
  
  
  init_per_suite(Config) ->
  