changes to serialize the data