replace defrecords with structs; use to_char_list for strings