added defrecordfn