modified serialisation