encoding of records