implemented deserialization