corrected serialization