Use struct instead of record