Rewritten util.Record to be more flexible