skeleton code for new serialisation