Added encode_datalist