fixed defn- to work with destructuring