               (write-str {:source (get-in gcacs [:source])
                           :target_spec target_spec
                           ;; TODO: eventually add :source-v2
-                          :gcacs gcacs
                           :targets (get-in gcacs [:targets])
-                          :targets-v2
-                          (map (fn [surface]
-                                 {:surface surface
-                                  :roots ["foo","bar"]})
-                               (get-in gcacs [:targets]))}))})
+                          :targets-v2 (get-in gcacs [:targets-v2])}))})
       (GET "/:expr" request
            (let [expr (:expr (:route-params request))]
              (log/debug (str "expr(1):" expr))

                                                 AND source.structure->'synsem'->'sem' @> '"
                                     json-semantics "' LIMIT 1) AS source
                                  INNER JOIN (SELECT DISTINCT surface, target.structure->'synsem'->'sem' AS sem,
                                                              root
                                                         FROM expression_with_root AS target
                                                        WHERE target.language=?
                                                          AND target.structure->'synsem'->'sem' = '" json-semantics "') AS target 

                           (get-in (strip-refs (deserialize
                                                (read-string (:target target-expression))))
                                              [:synsem :sem])))))
            (let [debug (log/trace (str "source-structure:"
                                        (first (map :structure results))))
                  debug (log/debug (str "read from target_structure:"
                                        (first (map :target_structure results))))
                  debug (log/debug (str "hello:" 
                                        (read-str (first (map :target_structure results)))))
                  debug (log/debug (str "hello2:" 
                                        (json-read-str (first (map :target_structure results)))))]
              {:source-id (first (map :source_id results))
               :source (first (map :source results))
               :targets-v2 (map (fn [result]
                                 {:surface (get result :target)
                                  :root (:target_root result)
                                  :lexemes
                                  (let [structure (json-read-str (:target_structure result))]
                                    (remove nil?
                                            [(get-in structure [:comp :italiano :italiano])
                                             (get-in structure [:root :italiano :infinitive])
                                             (get-in structure [:root :italiano :infinitive])
                                             (get-in structure [:root :italiano :italiano])]))})
                               results)
               :targets (map :target results)})))))))))

(defn get-lexeme [canonical language & [ spec ]]
