         grouped-subproblems (vals (group-by :expound.spec.problem/type subproblems))]
     (string/join
      "\n\nor\n\n"
-     (map #(expected-str2 % opts) grouped-subproblems))))
+     (map #(expected-str2 spec-name % opts) grouped-subproblems))))
 
 ;; TODO - namespace to expound
 (defmethod value-str :expound.problem/value-group [type spec-name val path problems opts]

(ns expound.alpha
  "Functions to print human-readable errors for clojure.spec"
  (:require [expound.paths :as paths]
            [expound.problems :as problems]
            [clojure.spec.alpha :as s]
            [clojure.string :as string]
            [clojure.set :as set]

;; TODO - move to new namespace
(defn ^:private problem-parts [problem opts]
  (let [type (:expound.spec.problem/type problem)
        val (:val problem)
        in (:expound/in problem)
        path (:expound/path problem)
        problems [problem]
        form (:expound/form problem)]
    {:type type
     :val val
     :path path
     :in in
     :problems problems
     :form form}))

(defn ^:private expected-str2 [spec-name problems opts]
  (let [problem (first problems)
        {:keys [type form in]} (problem-parts problem opts)]
    (expected-str type spec-name form in problems opts)))

(def ^:private format-str "%s\n\n%s\n\n%s")
