table: use the defrecord type instead of general record