portable serialization