                     (log/trace (str "json source semantics:" json-source-semantics))
                     (let [result
                           (first
-                           (db/exec-raw [(str "SELECT source.surface AS source, source.id AS source_id,
-                                              ARRAY_AGG(target.surface) AS target,ARRAY_AGG(target.root) AS target_root,
+                           (db/exec-raw [(str "SELECT source.surface AS source, source.id AS source_id,  "
+                                              " source.structure AS source_structure, "
+                                              " ARRAY_AGG(target.surface) AS target, "
+                                              " ARRAY_AGG(target.root) AS target_root,
                                               ARRAY_AGG(source.structure::jsonb) AS target_structure
                                         FROM (SELECT surface, source.structure->'synsem'->'sem' 
                                                      AS sem,

                                
                                (dissoc :target_root) ;; targets' roots -> 'target_roots'
                                (assoc :target_roots (read-array (:target_root result)))
                                
                                (dissoc :target_structure) ;; targets' structures -> 'target structures'

                                ((fn [retval]
                                   (or 
                                    (and show-target-structures

                                                 AND target.structure->'synsem'->'sem' = ?::jsonb) AS target 
                                          ON (source.surface IS NOT NULL) 
                                         AND (target.surface IS NOT NULL) "
                                              " GROUP BY source.surface,source.id,source.structure")
                                         [source-language json-source-semantics target-language json-target-semantics]]
                                        :results))]
                      (if (nil? result)
