ensure defn comes first