decoding to generated records