more work on types and defn