   END;  
 
   --create semimod gate
-  PERFORM create_gate(semimod_token,'semimod',ARRAY[token,value_token]);
+  PERFORM create_gate(semimod_token,'semimod',ARRAY[token::uuid,value_token]);
 
   RETURN semimod_token;
 END

CREATE OR REPLACE FUNCTION create_gate(
  token provenance_token,
  type provenance_gate,
  children provenance_token[] DEFAULT NULL)
  RETURNS void AS
  'provsql','create_gate' LANGUAGE C;
CREATE OR REPLACE FUNCTION get_gate_type(

  
  delta_token:=uuid_generate_v5(uuid_ns_provsql(),concat('delta',token));

  PERFORM create_gate(delta_token,'delta',ARRAY[token::uuid]);

  RETURN delta_token;
END
