use defn- on helper functions