corrected deserialize