update according to review; fixed deserialization